feat(router): not obtain middleware in RouteInfo

This commit is contained in:
thooh 2023-12-07 11:22:45 +08:00
parent 1c48977cca
commit 0c378a45d3

2
gin.go
View File

@ -59,6 +59,7 @@ type RouteInfo struct {
Method string
Path string
Handler string
Handlers HandlersChain
HandlerFunc HandlerFunc
}
@ -357,6 +358,7 @@ func iterate(path, method string, routes RoutesInfo, root *node) RoutesInfo {
Method: method,
Path: path,
Handler: nameOfFunction(handlerFunc),
Handlers: root.handlers,
HandlerFunc: handlerFunc,
})
}