copy mw len fix
This commit is contained in:
@@ -35,7 +35,7 @@ func (m *Mux) Resource(pattern string, fn func(res *Resource), mw ...func(http.H
|
||||
}
|
||||
|
||||
// Copy root middlewares.
|
||||
mws := make([]func(http.Handler) http.Handler, 0, len(m.middlewares)+len(mw))
|
||||
mws := make([]func(http.Handler) http.Handler, len(m.middlewares)+len(mw))
|
||||
copy(mws, m.middlewares)
|
||||
|
||||
// Append inline middlewares.
|
||||
|
Reference in New Issue
Block a user