fix: Fix bool ToBool bug (#2626)

This commit is contained in:
Kamyab Zareh 2023-06-13 12:50:21 +03:30 committed by GitHub
parent 0bdc7dd898
commit b1800df239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -340,6 +340,8 @@ func (cmd *Cmd) Bool() (bool, error) {
func toBool(val interface{}) (bool, error) {
switch val := val.(type) {
case bool:
return val, nil
case int64:
return val != 0, nil
case string: