changed MiddlewareFunc signature

This commit is contained in:
Darko Luketic 2016-09-06 16:24:28 +02:00
parent 16b8f5de0b
commit eec3f7da65

View File

@ -74,7 +74,7 @@ func (i *I18nMiddleware) Middleware(next http.Handler) http.Handler {
}) })
} }
func (i *I18nMiddleware) MiddlewareFunc(next http.Handler) http.HandlerFunc { func (i *I18nMiddleware) MiddlewareFunc(next http.HandlerFunc) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
bycookie := false bycookie := false
lang := r.URL.Query().Get(i.config.URLParam) lang := r.URL.Query().Get(i.config.URLParam)