TestRouterMethod() — gin Function Reference
Architecture documentation for the TestRouterMethod() function in routes_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 9fb8b963_920d_bc18_31b8_295960584647["TestRouterMethod()"] 45929e18_70ca_7c55_01e0_596be99dd824["routes_test.go"] 9fb8b963_920d_bc18_31b8_295960584647 -->|defined in| 45929e18_70ca_7c55_01e0_596be99dd824 9785c910_0083_377a_37b6_92b299e0e32d["PerformRequest()"] 9fb8b963_920d_bc18_31b8_295960584647 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d style 9fb8b963_920d_bc18_31b8_295960584647 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
routes_test.go lines 89–107
func TestRouterMethod(t *testing.T) {
router := New()
router.PUT("/hey2", func(c *Context) {
c.String(http.StatusOK, "sup2")
})
router.PUT("/hey", func(c *Context) {
c.String(http.StatusOK, "called")
})
router.PUT("/hey3", func(c *Context) {
c.String(http.StatusOK, "sup3")
})
w := PerformRequest(router, http.MethodPut, "/hey")
assert.Equal(t, http.StatusOK, w.Code)
assert.Equal(t, "called", w.Body.String())
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does TestRouterMethod() do?
TestRouterMethod() is a function in the gin codebase, defined in routes_test.go.
Where is TestRouterMethod() defined?
TestRouterMethod() is defined in routes_test.go at line 89.
What does TestRouterMethod() call?
TestRouterMethod() calls 1 function(s): PerformRequest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free