diff --git a/.golangci.yml b/.golangci.yml index b74e1ccce..57e5b15c7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,15 +1,21 @@ linters: disable-all: true enable: + - asasalint - asciicheck - bodyclose + - containedctx + - decorder - depguard - dogsled - errcheck + - errchkjson + - execinquery - exportloopref - gci - goconst - gocritic + - gocyclo - godot - gofmt - goimports @@ -24,8 +30,10 @@ linters: - nilerr - noctx - nolintlint + - nosprintfhostport - prealloc - predeclared + - reassign - revive - rowserrcheck - staticcheck @@ -35,6 +43,7 @@ linters: - unconvert - unparam - unused + - usestdlibvars - whitespace linters-settings: diff --git a/pkg/cloud/services/utils/accounts.go b/pkg/cloud/services/utils/accounts.go index 2b31264c1..813ccc349 100644 --- a/pkg/cloud/services/utils/accounts.go +++ b/pkg/cloud/services/utils/accounts.go @@ -29,7 +29,7 @@ import ( func GetAccount(auth core.Authenticator) (string, error) { // fake request to get a barer token from the request header ctx := context.TODO() - req, err := http.NewRequestWithContext(ctx, "GET", "http://example.com", http.NoBody) + req, err := http.NewRequestWithContext(ctx, http.MethodGet, "http://example.com", http.NoBody) if err != nil { return "", err }