Home / Function/ PerformRequest() — gin Function Reference

PerformRequest() — gin Function Reference

Architecture documentation for the PerformRequest() function in routes_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  69c2add5_555a_3d82_a4e7_993886631a2c["PerformRequest()"]
  a104956f_49af_a554_1a03_6961f40385d7["testRouteOK()"]
  a104956f_49af_a554_1a03_6961f40385d7 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  fd8a5e7a_4b0a_5cc7_43af_5f25ca192e76["testRouteNotOK()"]
  fd8a5e7a_4b0a_5cc7_43af_5f25ca192e76 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  ba098d85_3d0d_41fb_1df7_0ada76eebbc7["testRouteNotOK2()"]
  ba098d85_3d0d_41fb_1df7_0ada76eebbc7 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  50c7d563_9178_9f5f_c8b6_0478866b5cec["TestRouterMethod()"]
  50c7d563_9178_9f5f_c8b6_0478866b5cec -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  bb5089e7_5cca_37eb_ec54_2d5efbe12f20["TestRouteRedirectTrailingSlash()"]
  bb5089e7_5cca_37eb_ec54_2d5efbe12f20 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  717ab9ca_e067_966b_2380_c5d9364736ad["TestRouteRedirectFixedPath()"]
  717ab9ca_e067_966b_2380_c5d9364736ad -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  ac0208f6_f7d1_6811_1f84_2522040a46d9["TestRouteParamsByName()"]
  ac0208f6_f7d1_6811_1f84_2522040a46d9 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  e681c220_e797_32a2_9e88_4cacc70b10d9["TestRouteParamsByNameWithExtraSlash()"]
  e681c220_e797_32a2_9e88_4cacc70b10d9 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  f7c2c01e_dbfa_e9e9_6ef0_bbc2dc85741e["TestRouteParamsNotEmpty()"]
  f7c2c01e_dbfa_e9e9_6ef0_bbc2dc85741e -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  7434d9f0_8fdc_bae6_44ae_e78992ddf9ee["TestRouteStaticFile()"]
  7434d9f0_8fdc_bae6_44ae_e78992ddf9ee -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  3ba77c25_76fb_1207_f053_abd001093e4c["TestRouteStaticFileFS()"]
  3ba77c25_76fb_1207_f053_abd001093e4c -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  0e473730_f656_dd9e_f8d3_377007666d21["TestRouteStaticListingDir()"]
  0e473730_f656_dd9e_f8d3_377007666d21 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  ad43d80b_46a1_e81f_f83d_d4f8efd26a9d["TestRouteStaticNoListing()"]
  ad43d80b_46a1_e81f_f83d_d4f8efd26a9d -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  1ad01232_79e6_3962_3fe9_05bfe45a0dd0["TestRouterMiddlewareAndStatic()"]
  1ad01232_79e6_3962_3fe9_05bfe45a0dd0 -->|calls| 69c2add5_555a_3d82_a4e7_993886631a2c
  style 69c2add5_555a_3d82_a4e7_993886631a2c 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

Frequently Asked Questions

What does PerformRequest() do?
PerformRequest() is a function in the gin codebase.
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