statusColor() — fiber Function Reference
Architecture documentation for the statusColor() function in utils.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 57303f8a_1493_4504_4886_ff53923a764e["statusColor()"] bf06993d_3182_2860_9771_529cc14bc251["utils.go"] 57303f8a_1493_4504_4886_ff53923a764e -->|defined in| bf06993d_3182_2860_9771_529cc14bc251 style 57303f8a_1493_4504_4886_ff53923a764e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/logger/utils.go lines 35–49
func statusColor(code int, colors *fiber.Colors) string {
if colors == nil {
return ""
}
switch {
case code >= fiber.StatusOK && code < fiber.StatusMultipleChoices:
return colors.Green
case code >= fiber.StatusMultipleChoices && code < fiber.StatusBadRequest:
return colors.Blue
case code >= fiber.StatusBadRequest && code < fiber.StatusInternalServerError:
return colors.Yellow
default:
return colors.Red
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does statusColor() do?
statusColor() is a function in the fiber codebase, defined in middleware/logger/utils.go.
Where is statusColor() defined?
statusColor() is defined in middleware/logger/utils.go at line 35.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free