diff options
Diffstat (limited to 'middleware.go')
-rw-r--r-- | middleware.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/middleware.go b/middleware.go index 2b56105..7892966 100644 --- a/middleware.go +++ b/middleware.go @@ -4,10 +4,6 @@ import "net/http" type Middleware func(http.Handler) http.Handler -func Use(handler http.Handler, middlewares ...Middleware) http.Handler { - for _, h := range middlewares { - handler = h(handler) - } - - return handler +func (m *Mux) Use(middlewares ...Middleware) { + m.middlewares = append(m.middlewares, middlewares...) } |