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

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