Home / Function/ TestNoMethodWithoutGlobalHandlers() — gin Function Reference

TestNoMethodWithoutGlobalHandlers() — gin Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

gin_test.go lines 525–545

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

	router := New()

	router.NoMethod(middleware0)
	assert.Empty(t, router.Handlers)
	assert.Len(t, router.noMethod, 1)
	assert.Len(t, router.allNoMethod, 1)
	compareFunc(t, router.noMethod[0], middleware0)
	compareFunc(t, router.allNoMethod[0], middleware0)

	router.NoMethod(middleware1, middleware0)
	assert.Len(t, router.noMethod, 2)
	assert.Len(t, router.allNoMethod, 2)
	compareFunc(t, router.noMethod[0], middleware1)
	compareFunc(t, router.allNoMethod[0], middleware1)
	compareFunc(t, router.noMethod[1], middleware0)
	compareFunc(t, router.allNoMethod[1], middleware0)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestNoMethodWithoutGlobalHandlers() do?
TestNoMethodWithoutGlobalHandlers() is a function in the gin codebase, defined in gin_test.go.
Where is TestNoMethodWithoutGlobalHandlers() defined?
TestNoMethodWithoutGlobalHandlers() is defined in gin_test.go at line 525.
What does TestNoMethodWithoutGlobalHandlers() call?
TestNoMethodWithoutGlobalHandlers() 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