diff --git a/router.go b/router.go index 9cd64e5..41861d3 100644 --- a/router.go +++ b/router.go @@ -482,5 +482,5 @@ func buildChain(f http.HandlerFunc, m ...Middleware) http.HandlerFunc { return f } // otherwise nest the handlerfuncs - return m[0](buildChain(f, m[1:cap(m)]...)) + return m[0](buildChain(f, m[1:len(m)]...)) }