From 7f1555f988b5ffe3bd63c427b5a6b2d397a0e7d9 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Date: Wed, 26 Apr 2017 22:47:37 -0300 Subject: [PATCH] fix panic --- sessions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sessions.go b/sessions.go index c462b02..4669776 100644 --- a/sessions.go +++ b/sessions.go @@ -92,7 +92,7 @@ func Sessions(name string, store Store) negroni.HandlerFunc { ctx := context.WithValue(r.Context(), sessionKey, s) // Use before hook to save out the session - rw := res.(negroni.ResponseWriter) + rw := negroni.NewResponseWriter(res) rw.Before(func(negroni.ResponseWriter) { if s.Written() { check(s.Session().Save(r, res))