fix: 解析bool类型直接返回值

This commit is contained in:
TsMask committed 2024-05-10 19:34:40 +08:00
1 parent 0db7f269dc
commit ab6d610dac
1 file changed
+2
+2
View File
@@ -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
}