mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
fix bm router USE (#271)
This commit is contained in:
parent
934a84e69b
commit
85b9d677b7
@ -134,7 +134,6 @@ func (group *RouterGroup) HEAD(relativePath string, handlers ...HandlerFunc) IRo
|
||||
return group.handle("HEAD", relativePath, handlers...)
|
||||
}
|
||||
|
||||
|
||||
func (group *RouterGroup) combineHandlers(handlerGroups ...[]HandlerFunc) []HandlerFunc {
|
||||
finalSize := len(group.Handlers)
|
||||
for _, handlers := range handlerGroups {
|
||||
@ -190,4 +189,3 @@ func (group *RouterGroup) Any(relativePath string, handlers ...HandlerFunc) IRou
|
||||
group.handle("TRACE", relativePath, handlers...)
|
||||
return group.returnObj()
|
||||
}
|
||||
|
||||
|
@ -383,6 +383,8 @@ func (engine *Engine) UseFunc(middleware ...HandlerFunc) IRoutes {
|
||||
// For example, this is the right place for a logger or error management middleware.
|
||||
func (engine *Engine) Use(middleware ...Handler) IRoutes {
|
||||
engine.RouterGroup.Use(middleware...)
|
||||
engine.rebuild404Handlers()
|
||||
engine.rebuild405Handlers()
|
||||
return engine
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user