Locals() — fiber Function Reference
Architecture documentation for the Locals() function in req.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 12722b3c_7e0d_1ac9_887b_360dd335dbbe["Locals()"] 4a59f3b7_da1d_e590_a74b_87c592120e01["req.go"] 12722b3c_7e0d_1ac9_887b_360dd335dbbe -->|defined in| 4a59f3b7_da1d_e590_a74b_87c592120e01 style 12722b3c_7e0d_1ac9_887b_360dd335dbbe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
req.go lines 679–691
func Locals[V any](c Ctx, key any, value ...V) V {
var v V
var ok bool
if len(value) == 0 {
v, ok = c.Locals(key).(V)
} else {
v, ok = c.Locals(key, value[0]).(V)
}
if !ok {
return v // return zero of type V
}
return v
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Locals() do?
Locals() is a function in the fiber codebase, defined in req.go.
Where is Locals() defined?
Locals() is defined in req.go at line 679.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free