diff --git a/.golangci.yml b/.golangci.yml index 1ba6cb91..c64ba6e7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,7 @@ linters: - unconvert - gofmt - goimports - - golint + - revive - ineffassign - vet - unused diff --git a/context/http.go b/context/http.go index 548e4e17..bd3ebd95 100644 --- a/context/http.go +++ b/context/http.go @@ -246,9 +246,7 @@ func (ctx *muxVarsContext) Value(key interface{}) interface{} { return ctx.vars } - if strings.HasPrefix(keyStr, "vars.") { - keyStr = strings.TrimPrefix(keyStr, "vars.") - } + keyStr = strings.TrimPrefix(keyStr, "vars.") if v, ok := ctx.vars[keyStr]; ok { return v diff --git a/script/setup/install-dev-tools b/script/setup/install-dev-tools index 8047bb9d..f848981a 100755 --- a/script/setup/install-dev-tools +++ b/script/setup/install-dev-tools @@ -1,6 +1,6 @@ #!/usr/bin/env bash -GOLANGCI_LINT_VERSION="v1.27.0" +GOLANGCI_LINT_VERSION="v1.44.0" # # Install developer tools to $GOBIN (or $GOPATH/bin if unset)