mirror of
https://github.com/beego/bee.git
synced 2024-11-24 18:30:53 +00:00
fix issue #501
This commit is contained in:
parent
4ab8b8e30e
commit
d70cedc7de
@ -1225,6 +1225,8 @@ func str2RealType(s string, typ string) interface{} {
|
|||||||
switch typ {
|
switch typ {
|
||||||
case "int", "int64", "int32", "int16", "int8":
|
case "int", "int64", "int32", "int16", "int8":
|
||||||
ret, err = strconv.Atoi(s)
|
ret, err = strconv.Atoi(s)
|
||||||
|
case "uint", "uint64", "uint32", "uint16", "uint8":
|
||||||
|
ret, err = strconv.ParseUint(s, 10, 0)
|
||||||
case "bool":
|
case "bool":
|
||||||
ret, err = strconv.ParseBool(s)
|
ret, err = strconv.ParseBool(s)
|
||||||
case "float64":
|
case "float64":
|
||||||
|
Loading…
Reference in New Issue
Block a user