1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

fix: replace strings.ToLower with strings.EqualFold [BE-11524] (#263)

This commit is contained in:
Oscar Zhou 2024-12-24 11:15:16 +13:00 committed by GitHub
parent ad77cd195c
commit 87b8dd61c3
2 changed files with 5 additions and 7 deletions

View file

@ -19,7 +19,5 @@ func Confirm(message string) (bool, error) {
}
answer = strings.ReplaceAll(answer, "\n", "")
answer = strings.ToLower(answer)
return answer == "y" || answer == "yes", nil
return strings.EqualFold(answer, "y") || strings.EqualFold(answer, "yes"), nil
}