shouldSkip() — fiber Function Reference
Architecture documentation for the shouldSkip() function in compress.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 184ab948_7a36_6653_ee12_1af97571b3f5["shouldSkip()"] dbda7960_96fc_de94_3b5b_209ae85b21e1["compress.go"] 184ab948_7a36_6653_ee12_1af97571b3f5 -->|defined in| dbda7960_96fc_de94_3b5b_209ae85b21e1 9eaa029f_155c_0c51_4018_00ea7765246c["New()"] 9eaa029f_155c_0c51_4018_00ea7765246c -->|calls| 184ab948_7a36_6653_ee12_1af97571b3f5 76a3679b_5185_e49f_1323_28305527d888["hasToken()"] 184ab948_7a36_6653_ee12_1af97571b3f5 -->|calls| 76a3679b_5185_e49f_1323_28305527d888 style 184ab948_7a36_6653_ee12_1af97571b3f5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/compress/compress.go lines 21–39
func shouldSkip(c fiber.Ctx) bool {
if c.Method() == fiber.MethodHead {
return true
}
status := c.Response().StatusCode()
if status < 200 ||
status == fiber.StatusNoContent ||
status == fiber.StatusResetContent ||
status == fiber.StatusNotModified ||
status == fiber.StatusPartialContent ||
len(c.Response().Body()) == 0 ||
c.Get(fiber.HeaderRange) != "" ||
hasToken(c.Get(fiber.HeaderCacheControl), "no-transform") ||
hasToken(c.GetRespHeader(fiber.HeaderCacheControl), "no-transform") {
return true
}
return false
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does shouldSkip() do?
shouldSkip() is a function in the fiber codebase, defined in middleware/compress/compress.go.
Where is shouldSkip() defined?
shouldSkip() is defined in middleware/compress/compress.go at line 21.
What does shouldSkip() call?
shouldSkip() calls 1 function(s): hasToken.
What calls shouldSkip()?
shouldSkip() is called by 1 function(s): New.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free