TestTreeDoubleWildcard() — gin Function Reference
Architecture documentation for the TestTreeDoubleWildcard() function in tree_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD b710bb22_7bd2_4892_2659_16c1fa702b4a["TestTreeDoubleWildcard()"] 7d17d111_6d55_8539_e0ed_b32eea9e5ef6["catchPanic()"] b710bb22_7bd2_4892_2659_16c1fa702b4a -->|calls| 7d17d111_6d55_8539_e0ed_b32eea9e5ef6 style b710bb22_7bd2_4892_2659_16c1fa702b4a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tree_test.go lines 539–558
func TestTreeDoubleWildcard(t *testing.T) {
const panicMsg = "only one wildcard per path segment is allowed"
routes := [...]string{
"/:foo:bar",
"/:foo:bar/",
"/:foo*bar",
}
for _, route := range routes {
tree := &node{}
recv := catchPanic(func() {
tree.addRoute(route, nil)
})
if rs, ok := recv.(string); !ok || !strings.HasPrefix(rs, panicMsg) {
t.Fatalf(`"Expected panic "%s" for route '%s', got "%v"`, panicMsg, route, recv)
}
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does TestTreeDoubleWildcard() do?
TestTreeDoubleWildcard() is a function in the gin codebase.
What does TestTreeDoubleWildcard() call?
TestTreeDoubleWildcard() calls 1 function(s): catchPanic.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free