Home / Function/ TestNoRouteWithoutGlobalHandlers() — gin Function Reference

TestNoRouteWithoutGlobalHandlers() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  3474cd22_3a47_a2d8_5d99_33c2ce8e039b["TestNoRouteWithoutGlobalHandlers()"]
  5d6e7276_feeb_b8e2_30e8_0ae0827740a5["gin_test.go"]
  3474cd22_3a47_a2d8_5d99_33c2ce8e039b -->|defined in| 5d6e7276_feeb_b8e2_30e8_0ae0827740a5
  a423cae4_a5e4_5096_1105_5638627a5c35["compareFunc()"]
  3474cd22_3a47_a2d8_5d99_33c2ce8e039b -->|calls| a423cae4_a5e4_5096_1105_5638627a5c35
  style 3474cd22_3a47_a2d8_5d99_33c2ce8e039b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin_test.go lines 472–492

func TestNoRouteWithoutGlobalHandlers(t *testing.T) {
	var middleware0 HandlerFunc = func(c *Context) {}
	var middleware1 HandlerFunc = func(c *Context) {}

	router := New()

	router.NoRoute(middleware0)
	assert.Nil(t, router.Handlers)
	assert.Len(t, router.noRoute, 1)
	assert.Len(t, router.allNoRoute, 1)
	compareFunc(t, router.noRoute[0], middleware0)
	compareFunc(t, router.allNoRoute[0], middleware0)

	router.NoRoute(middleware1, middleware0)
	assert.Len(t, router.noRoute, 2)
	assert.Len(t, router.allNoRoute, 2)
	compareFunc(t, router.noRoute[0], middleware1)
	compareFunc(t, router.allNoRoute[0], middleware1)
	compareFunc(t, router.noRoute[1], middleware0)
	compareFunc(t, router.allNoRoute[1], middleware0)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestNoRouteWithoutGlobalHandlers() do?
TestNoRouteWithoutGlobalHandlers() is a function in the gin codebase, defined in gin_test.go.
Where is TestNoRouteWithoutGlobalHandlers() defined?
TestNoRouteWithoutGlobalHandlers() is defined in gin_test.go at line 472.
What does TestNoRouteWithoutGlobalHandlers() call?
TestNoRouteWithoutGlobalHandlers() calls 1 function(s): compareFunc.

Analyze Your Own Codebase

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

Try Supermodel Free