Skip to content

Commit b1800df

Browse files
authored
fix: Fix bool ToBool bug (#2626)
1 parent 0bdc7dd commit b1800df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

command.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ func (cmd *Cmd) Bool() (bool, error) {
340340

341341
func toBool(val interface{}) (bool, error) {
342342
switch val := val.(type) {
343+
case bool:
344+
return val, nil
343345
case int64:
344346
return val != 0, nil
345347
case string:

0 commit comments

Comments
 (0)