MCPcopy
hub / github.com/gin-gonic/gin / debugPrintRoute

Function debugPrintRoute

debug.go:32–42  ·  view source on GitHub ↗
(httpMethod, absolutePath string, handlers HandlersChain)

Source from the content-addressed store, hash-verified

30var DebugPrintFunc func(format string, values ...any)
31
32func debugPrintRoute(httpMethod, absolutePath string, handlers HandlersChain) {
33 if IsDebugging() {
34 nuHandlers := len(handlers)
35 handlerName := nameOfFunction(handlers.Last())
36 if DebugPrintRouteFunc == nil {
37 debugPrint("%-6s %-25s --> %s (%d handlers)\n", httpMethod, absolutePath, handlerName, nuHandlers)
38 } else {
39 DebugPrintRouteFunc(httpMethod, absolutePath, handlerName, nuHandlers)
40 }
41 }
42}
43
44func debugPrintLoadTemplate(tmpl *template.Template) {
45 if IsDebugging() {

Callers 3

addRouteMethod · 0.85
TestDebugPrintRoutesFunction · 0.85
TestDebugPrintRouteFuncFunction · 0.85

Calls 4

IsDebuggingFunction · 0.85
nameOfFunctionFunction · 0.85
debugPrintFunction · 0.85
LastMethod · 0.45

Tested by 2

TestDebugPrintRoutesFunction · 0.68
TestDebugPrintRouteFuncFunction · 0.68