Skip to content

Commit

Permalink
cc.ToBoolean
Browse files Browse the repository at this point in the history
  • Loading branch information
qwenode committed Jun 5, 2024
1 parent e8d56eb commit 6b08ba3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions cc/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ func ToString(str interface{}) string {
// ToBoolean convert to boolean
func ToBoolean(data interface{}) bool {
switch data.(type) {
case int:
case int32:
case int64:
case uint:
case uint32:
case uint64:
case uint8:
case int8:
case int, int32, int64, uint, uint32, uint64, uint8, int8:
toInt := ToInt(data)
return toInt > 0
case string:
Expand Down

0 comments on commit 6b08ba3

Please sign in to comment.