secondsToDuration() — fiber Function Reference
Architecture documentation for the secondsToDuration() function in cache.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 3451b67c_67a6_b395_a928_4eec89698562["secondsToDuration()"] af95e058_7e86_ec88_42f0_cd294e342508["cache.go"] 3451b67c_67a6_b395_a928_4eec89698562 -->|defined in| af95e058_7e86_ec88_42f0_cd294e342508 96447356_67b9_a364_148e_b703c487e1ba["New()"] 96447356_67b9_a364_148e_b703c487e1ba -->|calls| 3451b67c_67a6_b395_a928_4eec89698562 e18a2523_3ba3_2294_4841_14f65080f198["parseMaxAge()"] e18a2523_3ba3_2294_4841_14f65080f198 -->|calls| 3451b67c_67a6_b395_a928_4eec89698562 style 3451b67c_67a6_b395_a928_4eec89698562 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/cache/cache.go lines 1248–1254
func secondsToDuration(sec uint64) time.Duration {
const maxSeconds = uint64(math.MaxInt64) / uint64(time.Second)
if sec > maxSeconds {
return time.Duration(math.MaxInt64)
}
return time.Duration(sec) * time.Second
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does secondsToDuration() do?
secondsToDuration() is a function in the fiber codebase, defined in middleware/cache/cache.go.
Where is secondsToDuration() defined?
secondsToDuration() is defined in middleware/cache/cache.go at line 1248.
What calls secondsToDuration()?
secondsToDuration() is called by 2 function(s): New, parseMaxAge.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free