mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 17:50:50 +00:00
remove the comments
This commit is contained in:
parent
234708062a
commit
3c17e2a7e6
@ -189,16 +189,16 @@ func ParseBool(val interface{}) (value bool, err error) {
|
||||
return false, nil
|
||||
}
|
||||
case int8, int32, int64:
|
||||
strV := fmt.Sprintf("%d", v) // w 由 %s 修改为 %d
|
||||
strV := fmt.Sprintf("%d", v)
|
||||
if strV == "1" {
|
||||
return true, nil
|
||||
} else if strV == "0" {
|
||||
return false, nil
|
||||
}
|
||||
case float64:
|
||||
if v == 1.0 { // w 由 1 修改为 1.0
|
||||
if v == 1.0 {
|
||||
return true, nil
|
||||
} else if v == 0.0 { // w 由 0 修改为 0.0
|
||||
} else if v == 0.0 {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user