pathMatch() — fiber Function Reference
Architecture documentation for the pathMatch() function in cookiejar.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 0986cf44_a71a_b2e7_e8cf_903439313704["pathMatch()"] 1f636fe9_2e71_d567_5a28_0ab4e08b68c5["cookiejar.go"] 0986cf44_a71a_b2e7_e8cf_903439313704 -->|defined in| 1f636fe9_2e71_d567_5a28_0ab4e08b68c5 0c8c328c_fd69_9d64_ceae_c157801bc31b["searchCookieByKeyAndPath()"] 0c8c328c_fd69_9d64_ceae_c157801bc31b -->|calls| 0986cf44_a71a_b2e7_e8cf_903439313704 style 0986cf44_a71a_b2e7_e8cf_903439313704 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
client/cookiejar.go lines 305–322
func pathMatch(reqPath, cookiePath []byte) bool {
if len(reqPath) == 0 {
reqPath = []byte("/")
}
if len(cookiePath) == 0 {
cookiePath = []byte("/")
}
if bytes.Equal(reqPath, cookiePath) {
return true
}
if !bytes.HasPrefix(reqPath, cookiePath) {
return false
}
if cookiePath[len(cookiePath)-1] == '/' {
return true
}
return len(reqPath) > len(cookiePath) && reqPath[len(cookiePath)] == '/'
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does pathMatch() do?
pathMatch() is a function in the fiber codebase, defined in client/cookiejar.go.
Where is pathMatch() defined?
pathMatch() is defined in client/cookiejar.go at line 305.
What calls pathMatch()?
pathMatch() is called by 1 function(s): searchCookieByKeyAndPath.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free