Home / Function/ TestRoutes() — gin Function Reference

TestRoutes() — gin Function Reference

Architecture documentation for the TestRoutes() function in gins_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

ginS/gins_test.go lines 193–207

func TestRoutes(t *testing.T) {
	GET("/routes-test", func(c *gin.Context) {})

	routes := Routes()
	assert.NotEmpty(t, routes)

	found := false
	for _, route := range routes {
		if route.Path == "/routes-test" && route.Method == http.MethodGet {
			found = true
			break
		}
	}
	assert.True(t, found)
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free