MCPcopy Index your code
hub / github.com/OpenListTeam/OpenList / UpdateProgressWithRange

Function UpdateProgressWithRange

internal/model/obj.go:57–68  ·  view source on GitHub ↗
(inner UpdateProgress, start, end float64)

Source from the content-addressed store, hash-verified

55type UpdateProgress func(percentage float64)
56
57func UpdateProgressWithRange(inner UpdateProgress, start, end float64) UpdateProgress {
58 return func(p float64) {
59 if p < 0 {
60 p = 0
61 }
62 if p > 100 {
63 p = 100
64 }
65 scaled := start + (end-start)*(p/100.0)
66 inner(scaled)
67 }
68}
69
70type URL interface {
71 URL() string

Callers 4

putMethod · 0.92
hfDirectUploadMethod · 0.92
CacheFullAndWriterMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected