TestEscapedColon() — gin Function Reference
Architecture documentation for the TestEscapedColon() function in gin_integration_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 2a522dce_0f60_1760_7648_6dc5679436c7["TestEscapedColon()"] 0cb54875_e9be_d799_8e29_6666cf3d9cd7["testRequest()"] 2a522dce_0f60_1760_7648_6dc5679436c7 -->|calls| 0cb54875_e9be_d799_8e29_6666cf3d9cd7 style 2a522dce_0f60_1760_7648_6dc5679436c7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
gin_integration_test.go lines 584–607
func TestEscapedColon(t *testing.T) {
router := New()
f := func(u string) {
router.GET(u, func(c *Context) { c.String(http.StatusOK, u) })
}
f("/r/r\\:r")
f("/r/r:r")
f("/r/r/:r")
f("/r/r/\\:r")
f("/r/r/r\\:r")
assert.Panics(t, func() {
f("\\foo:")
})
router.updateRouteTrees()
ts := httptest.NewServer(router)
defer ts.Close()
testRequest(t, ts.URL+"/r/r123", "", "/r/r:r")
testRequest(t, ts.URL+"/r/r:r", "", "/r/r\\:r")
testRequest(t, ts.URL+"/r/r/r123", "", "/r/r/:r")
testRequest(t, ts.URL+"/r/r/:r", "", "/r/r/\\:r")
testRequest(t, ts.URL+"/r/r/r:r", "", "/r/r/r\\:r")
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does TestEscapedColon() do?
TestEscapedColon() is a function in the gin codebase.
What does TestEscapedColon() call?
TestEscapedColon() calls 1 function(s): testRequest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free