Home / Function/ TestDebugPrintRouteFunc() — gin Function Reference

TestDebugPrintRouteFunc() — gin Function Reference

Architecture documentation for the TestDebugPrintRouteFunc() function in debug_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  7007f354_750f_ae3a_aacd_eba9cb79758e["TestDebugPrintRouteFunc()"]
  8ee5a2af_634d_2b9b_d50c_11685d28130a["captureOutput()"]
  7007f354_750f_ae3a_aacd_eba9cb79758e -->|calls| 8ee5a2af_634d_2b9b_d50c_11685d28130a
  style 7007f354_750f_ae3a_aacd_eba9cb79758e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

debug_test.go lines 77–87

func TestDebugPrintRouteFunc(t *testing.T) {
	DebugPrintRouteFunc = func(httpMethod, absolutePath, handlerName string, nuHandlers int) {
		fmt.Fprintf(DefaultWriter, "[GIN-debug] %-6s %-40s --> %s (%d handlers)\n", httpMethod, absolutePath, handlerName, nuHandlers)
	}
	re := captureOutput(t, func() {
		SetMode(DebugMode)
		debugPrintRoute(http.MethodGet, "/path/to/route/:param1/:param2", HandlersChain{func(c *Context) {}, handlerNameTest})
		SetMode(TestMode)
	})
	assert.Regexp(t, `^\[GIN-debug\] GET    /path/to/route/:param1/:param2           --> (.*/vendor/)?github.com/gin-gonic/gin.handlerNameTest \(2 handlers\)\n$`, re)
}

Domain

Subdomains

Frequently Asked Questions

What does TestDebugPrintRouteFunc() do?
TestDebugPrintRouteFunc() is a function in the gin codebase.
What does TestDebugPrintRouteFunc() call?
TestDebugPrintRouteFunc() calls 1 function(s): captureOutput.

Analyze Your Own Codebase

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

Try Supermodel Free