mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
fix StringToBool (thanks @wrmsr)
This commit is contained in:
parent
c34477c937
commit
e59aa43225
1 changed files with 2 additions and 2 deletions
|
|
@ -51,9 +51,9 @@ func ArgsToStrings(maxLength int, arguments []string, delim string) []string {
|
||||||
|
|
||||||
func StringToBool(str string) (result bool, err error) {
|
func StringToBool(str string) (result bool, err error) {
|
||||||
switch strings.ToLower(str) {
|
switch strings.ToLower(str) {
|
||||||
case "on", "true", "t", "yes", "y", "disabled":
|
case "on", "true", "t", "yes", "y", "enabled":
|
||||||
result = true
|
result = true
|
||||||
case "off", "false", "f", "no", "n", "enabled":
|
case "off", "false", "f", "no", "n", "disabled":
|
||||||
result = false
|
result = false
|
||||||
default:
|
default:
|
||||||
err = ErrInvalidParams
|
err = ErrInvalidParams
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue