1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +00:00

Merge pull request #502 from terryding77/fix/uint_default_value_in_swagger_json

fix issue #501
This commit is contained in:
astaxie 2017-12-30 13:54:44 +08:00 committed by GitHub
commit d23d3e5bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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":