fix StringToBool (thanks @wrmsr)

This commit is contained in:
Shivaram Lingamneni 2020-02-19 00:54:42 -05:00
parent c34477c937
commit e59aa43225
1 changed files with 2 additions and 2 deletions

View File

@ -51,9 +51,9 @@ func ArgsToStrings(maxLength int, arguments []string, delim string) []string {
func StringToBool(str string) (result bool, err error) {
switch strings.ToLower(str) {
case "on", "true", "t", "yes", "y", "disabled":
case "on", "true", "t", "yes", "y", "enabled":
result = true
case "off", "false", "f", "no", "n", "enabled":
case "off", "false", "f", "no", "n", "disabled":
result = false
default:
err = ErrInvalidParams