Преглед изворни кода

debugPrintRoute() is called in the lowest layer of abstraction

Manu Mtz-Almeida пре 10 година
родитељ
комит
c2abae6840
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 0
      gin.go
  2. 0 1
      routergroup.go

+ 2 - 0
gin.go

@@ -141,6 +141,8 @@ func (engine *Engine) rebuild405Handlers() {
 }
 
 func (engine *Engine) addRoute(method, path string, handlers HandlersChain) {
+	debugPrintRoute(method, path, handlers)
+
 	if path[0] != '/' {
 		panic("path must begin with '/'")
 	}

+ 0 - 1
routergroup.go

@@ -45,7 +45,6 @@ func (group *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *R
 func (group *RouterGroup) handle(httpMethod, relativePath string, handlers HandlersChain) {
 	absolutePath := group.calculateAbsolutePath(relativePath)
 	handlers = group.combineHandlers(handlers)
-	debugPrintRoute(httpMethod, absolutePath, handlers)
 	group.engine.addRoute(httpMethod, absolutePath, handlers)
 }