This website works better with JavaScript.
Home
Explore
Help
Sign In
GaoreGo
/
cast
Watch
6
Star
0
Fork
0
Code
Releases
6
Activity
Browse Source
Merge
5d93088034
into
1ffadf5510
pull/84/merge
neocarton
GitHub
4 years ago
parent
1ffadf5510
5d93088034
commit
a11cb8c82d
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
1 changed files
with
7 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-2
caste.go
+ 7
- 2
caste.go
View File
@@ -79,8 +79,13 @@ func ToBoolE(i interface{}) (bool, error) {
return b, nil
case nil:
return false, nil
case int:
if i.(int) != 0 {
case int, int32, int64, uint, uint32, uint64:
if b != 0 {
return true, nil
}
return false, nil
case float32, float64:
if b != 0.0 {
return true, nil
}
return false, nil
Write
Preview
Loading…
Cancel
Save