fix: 解析bool类型直接返回值
This commit is contained in:
@@ -55,6 +55,8 @@ func Boolean(str any) bool {
|
||||
case float32, float64:
|
||||
num := reflect.ValueOf(str).Float()
|
||||
return num != 0
|
||||
case bool:
|
||||
return str
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user