PerformRequest() — gin Function Reference
Architecture documentation for the PerformRequest() function in routes_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 9785c910_0083_377a_37b6_92b299e0e32d["PerformRequest()"] 45929e18_70ca_7c55_01e0_596be99dd824["routes_test.go"] 9785c910_0083_377a_37b6_92b299e0e32d -->|defined in| 45929e18_70ca_7c55_01e0_596be99dd824 1e0a4e8c_1c8a_9ec4_0ee9_9fe0da65b0e9["testRouteOK()"] 1e0a4e8c_1c8a_9ec4_0ee9_9fe0da65b0e9 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d cea87d1a_5469_a91a_3013_d79ad4ce4136["testRouteNotOK()"] cea87d1a_5469_a91a_3013_d79ad4ce4136 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d ec16dc06_f7e7_5002_96d6_845328485a07["testRouteNotOK2()"] ec16dc06_f7e7_5002_96d6_845328485a07 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d 9fb8b963_920d_bc18_31b8_295960584647["TestRouterMethod()"] 9fb8b963_920d_bc18_31b8_295960584647 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d 371010dc_a92a_c9d2_beeb_826bf62d0c7a["TestRouteRedirectTrailingSlash()"] 371010dc_a92a_c9d2_beeb_826bf62d0c7a -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d d4a6c451_0659_7aa7_f5da_b05392a26203["TestRouteRedirectFixedPath()"] d4a6c451_0659_7aa7_f5da_b05392a26203 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d 1a7f7ac1_d51c_1c57_12f9_58970ffffed0["TestRouteParamsByName()"] 1a7f7ac1_d51c_1c57_12f9_58970ffffed0 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d 733c5eaf_b00b_ba7c_2bf0_153b6649f068["TestRouteParamsByNameWithExtraSlash()"] 733c5eaf_b00b_ba7c_2bf0_153b6649f068 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d 94f5d8aa_9dc1_269e_e4d7_73993234547a["TestRouteParamsNotEmpty()"] 94f5d8aa_9dc1_269e_e4d7_73993234547a -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d b0d339b7_8aee_d479_0037_618491a1c7c3["TestRouteStaticFile()"] b0d339b7_8aee_d479_0037_618491a1c7c3 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d ea579951_d354_9459_d789_7fbeaac5ee68["TestRouteStaticFileFS()"] ea579951_d354_9459_d789_7fbeaac5ee68 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d 86ebdba2_1687_9504_b61a_cd89e496929a["TestRouteStaticListingDir()"] 86ebdba2_1687_9504_b61a_cd89e496929a -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d a37f2c89_f636_c745_de49_87c6006f8929["TestRouteStaticNoListing()"] a37f2c89_f636_c745_de49_87c6006f8929 -->|calls| 9785c910_0083_377a_37b6_92b299e0e32d style 9785c910_0083_377a_37b6_92b299e0e32d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
routes_test.go lines 25–33
func PerformRequest(r http.Handler, method, path string, headers ...header) *httptest.ResponseRecorder {
req := httptest.NewRequest(method, path, nil)
for _, h := range headers {
req.Header.Add(h.Key, h.Value)
}
w := httptest.NewRecorder()
r.ServeHTTP(w, req)
return w
}
Domain
Subdomains
Defined In
Called By
- TestEngineHandleMethodNotAllowedCornerCase()
- TestMiddlewareCalledOnceByRouterStaticFSNotFound()
- TestRouteContextHoldsFullPath()
- TestRouteNotAllowedDisabled()
- TestRouteNotAllowedEnabled()
- TestRouteNotAllowedEnabled2()
- TestRouteNotAllowedEnabled3()
- TestRouteParamsByName()
- TestRouteParamsByNameWithExtraSlash()
- TestRouteParamsNotEmpty()
- TestRouteRawPath()
- TestRouteRawPathNoUnescape()
- TestRouteRedirectFixedPath()
- TestRouteRedirectTrailingSlash()
- TestRouteServeErrorWithWriteHeader()
- TestRouteStaticFile()
- TestRouteStaticFileFS()
- TestRouteStaticListingDir()
- TestRouteStaticNoListing()
- TestRouterMethod()
- TestRouterMiddlewareAndStatic()
- TestRouterNotFound()
- TestRouterNotFoundWithRemoveExtraSlash()
- TestRouterStaticFSFileNotFound()
- TestRouterStaticFSNotFound()
- testRouteNotOK()
- testRouteNotOK2()
- testRouteOK()
Source
Frequently Asked Questions
What does PerformRequest() do?
PerformRequest() is a function in the gin codebase, defined in routes_test.go.
Where is PerformRequest() defined?
PerformRequest() is defined in routes_test.go at line 25.
What calls PerformRequest()?
PerformRequest() is called by 28 function(s): TestEngineHandleMethodNotAllowedCornerCase, TestMiddlewareCalledOnceByRouterStaticFSNotFound, TestRouteContextHoldsFullPath, TestRouteNotAllowedDisabled, TestRouteNotAllowedEnabled, TestRouteNotAllowedEnabled2, TestRouteNotAllowedEnabled3, TestRouteParamsByName, and 20 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free