Skip to content

Commit

Permalink
Update golangci-lint version and fix reports
Browse files Browse the repository at this point in the history
This commit updates golangci-lint to v1.44.0.
It also removes deprecated golint in favour of revive linter.
Finally, it addresses an issue reported by linter.

Signed-off-by: Milos Gajdos <[email protected]>
  • Loading branch information
milosgajdos committed Jan 28, 2022
1 parent be4c921 commit ebd3f44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linters:
- unconvert
- gofmt
- goimports
- golint
- revive
- ineffassign
- vet
- unused
Expand Down
4 changes: 1 addition & 3 deletions context/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion script/setup/install-dev-tools
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit ebd3f44

Please sign in to comment.