From 9a8a741550bcc595222667e28e0006562895bcaf Mon Sep 17 00:00:00 2001 From: Calle Gustafsson <67468+tw1nk@users.noreply.github.com> Date: Tue, 27 Nov 2018 14:12:31 +0100 Subject: [PATCH] Fixes - #83 Middleware Chains - Nil pointer dereference #83 --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)]...)) }