From a3be67e3c2b7dbda048d73967f239582bbcad0bd Mon Sep 17 00:00:00 2001 From: Sergio Andres Virviescas Santana Date: Sat, 15 May 2021 15:38:25 +0200 Subject: [PATCH] Upgrade golangci-lint to v1.40.1 --- .travis.yml | 2 +- router.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e9522a..d36f9b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ jobs: include: - stage: lint script: - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.39.0 + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.40.1 - golangci-lint run - stage: cross compilation diff --git a/router.go b/router.go index 111587f..d9cbab5 100644 --- a/router.go +++ b/router.go @@ -106,7 +106,9 @@ func (r *Router) getGroupFullPath(path string) string { func (r *Router) handler(fn View, middle Middlewares) fasthttp.RequestHandler { middle = r.buildMiddlewares(middle) - chain := append(middle.Before, func(ctx *RequestCtx) error { + chain := make([]Middleware, 0) + chain = append(chain, middle.Before...) + chain = append(chain, func(ctx *RequestCtx) error { if !ctx.skipView { if err := fn(ctx); err != nil { return err