MCPcopy
hub / github.com/gofiber/fiber / secondsToDuration

Function secondsToDuration

middleware/cache/utils.go:130–136  ·  view source on GitHub ↗
(sec uint64)

Source from the content-addressed store, hash-verified

128}
129
130func secondsToDuration(sec uint64) time.Duration {
131 const maxSeconds = uint64(math.MaxInt64) / uint64(time.Second)
132 if sec > maxSeconds {
133 return time.Duration(math.MaxInt64)
134 }
135 return time.Duration(sec) * time.Second
136}
137
138func makeHashAuthFunc(hexBufPool *sync.Pool) func([]byte) string {
139 return func(authHeader []byte) string {

Callers 3

NewFunction · 0.70

Calls

no outgoing calls

Tested by 2