Home / Function/ assertRoutePresent() — gin Function Reference

assertRoutePresent() — gin Function Reference

Architecture documentation for the assertRoutePresent() function in gin_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  9d1c96e4_2f26_1805_3c63_048a2af89dce["assertRoutePresent()"]
  8bc13af8_b878_e691_7f8d_79fd36b485e9["TestListOfRoutes()"]
  8bc13af8_b878_e691_7f8d_79fd36b485e9 -->|calls| 9d1c96e4_2f26_1805_3c63_048a2af89dce
  7eaba738_b6e6_129d_bbf6_552a3daf37ae["TestNewOptionFunc()"]
  7eaba738_b6e6_129d_bbf6_552a3daf37ae -->|calls| 9d1c96e4_2f26_1805_3c63_048a2af89dce
  4f98b295_57fa_c059_9470_35e237537b3b["TestWithOptionFunc()"]
  4f98b295_57fa_c059_9470_35e237537b3b -->|calls| 9d1c96e4_2f26_1805_3c63_048a2af89dce
  style 9d1c96e4_2f26_1805_3c63_048a2af89dce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin_test.go lines 908–916

func assertRoutePresent(t *testing.T, gotRoutes RoutesInfo, wantRoute RouteInfo) {
	for _, gotRoute := range gotRoutes {
		if gotRoute.Path == wantRoute.Path && gotRoute.Method == wantRoute.Method {
			assert.Regexp(t, wantRoute.Handler, gotRoute.Handler)
			return
		}
	}
	t.Errorf("route not found: %v", wantRoute)
}

Domain

Subdomains

Frequently Asked Questions

What does assertRoutePresent() do?
assertRoutePresent() is a function in the gin codebase.
What calls assertRoutePresent()?
assertRoutePresent() is called by 3 function(s): TestListOfRoutes, TestNewOptionFunc, TestWithOptionFunc.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free