kubeadm: fix gocritic lint errors

This commit is contained in:
SataQiu 2023-01-08 11:23:26 +08:00
parent 3aff1f97be
commit e0f11d9c5b
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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
}