mirror of https://github.com/gin-gonic/gin.git
debugPrintRoute() is called in the lowest layer of abstraction
This commit is contained in:
parent
138e4b49bf
commit
c2abae6840
2
gin.go
2
gin.go
|
@ -141,6 +141,8 @@ func (engine *Engine) rebuild405Handlers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (engine *Engine) addRoute(method, path string, handlers HandlersChain) {
|
func (engine *Engine) addRoute(method, path string, handlers HandlersChain) {
|
||||||
|
debugPrintRoute(method, path, handlers)
|
||||||
|
|
||||||
if path[0] != '/' {
|
if path[0] != '/' {
|
||||||
panic("path must begin with '/'")
|
panic("path must begin with '/'")
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ func (group *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *R
|
||||||
func (group *RouterGroup) handle(httpMethod, relativePath string, handlers HandlersChain) {
|
func (group *RouterGroup) handle(httpMethod, relativePath string, handlers HandlersChain) {
|
||||||
absolutePath := group.calculateAbsolutePath(relativePath)
|
absolutePath := group.calculateAbsolutePath(relativePath)
|
||||||
handlers = group.combineHandlers(handlers)
|
handlers = group.combineHandlers(handlers)
|
||||||
debugPrintRoute(httpMethod, absolutePath, handlers)
|
|
||||||
group.engine.addRoute(httpMethod, absolutePath, handlers)
|
group.engine.addRoute(httpMethod, absolutePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue