Use lowercase string booleans

This commit is contained in:
tidwall 2020-11-04 15:59:08 -07:00
parent eeddc5431f
commit 71341b2042
1 changed files with 2 additions and 2 deletions

View File

@ -106,8 +106,8 @@ func (t Result) Bool() bool {
case True:
return true
case String:
b, err := strconv.ParseBool(t.Str)
return !(!b || err != nil)
b, _ := strconv.ParseBool(strings.ToLower(t.Str))
return b
case Number:
return t.Num != 0
}