diff --git a/.golangci.yaml b/.golangci.yaml index dd674bafa39..e5cd0b2b90e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -13,7 +13,7 @@ issues: - ineffassign # TODO(oscr) Remove these excluded directories and fix findings. Due to large amount of findings in different components # with different owners it's hard to fix everything in a single pr. This will therefore be done in multiple prs. - - path: (pkg/volume/*|test/*|cmd/kubeadm/*|azure/*|pkg/cmd/wait*|request/bearertoken/*|metrics/*|filters/*) + - path: (pkg/volume/*|test/*|azure/*|pkg/cmd/wait*|request/bearertoken/*|metrics/*|filters/*) linters: - gocritic diff --git a/cmd/kubeadm/app/cmd/util/cmdutil.go b/cmd/kubeadm/app/cmd/util/cmdutil.go index a76faf3bd1e..8ed09fa1503 100644 --- a/cmd/kubeadm/app/cmd/util/cmdutil.go +++ b/cmd/kubeadm/app/cmd/util/cmdutil.go @@ -123,7 +123,7 @@ func InteractivelyConfirmAction(action, question string, r io.Reader) error { return errors.Wrap(err, "couldn't read from standard input") } answer := scanner.Text() - if strings.ToLower(answer) == "y" || strings.ToLower(answer) == "yes" { + if strings.EqualFold(answer, "y") || strings.EqualFold(answer, "yes") { return nil }