RoutesInterface includes Group()
This commit is contained in:
4
gin.go
4
gin.go
@ -70,6 +70,8 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
var _ RoutesInterface = &Engine{}
|
||||
|
||||
func (c HandlersChain) Last() HandlerFunc {
|
||||
length := len(c)
|
||||
if length > 0 {
|
||||
@ -157,7 +159,7 @@ func (engine *Engine) NoMethod(handlers ...HandlerFunc) {
|
||||
// Attachs a global middleware to the router. ie. the middlewares attached though Use() will be
|
||||
// included in the handlers chain for every single request. Even 404, 405, static files...
|
||||
// For example, this is the right place for a logger or error management middleware.
|
||||
func (engine *Engine) Use(middlewares ...HandlerFunc) RoutesInterface {
|
||||
func (engine *Engine) Use(middlewares ...HandlerFunc) routesInterface {
|
||||
engine.RouterGroup.Use(middlewares...)
|
||||
engine.rebuild404Handlers()
|
||||
engine.rebuild405Handlers()
|
||||
|
Reference in New Issue
Block a user