mirror of https://github.com/spf13/cast.git
Modify int32 in the ToStringE function
Reason: 1. Be consistent with other int type
This commit is contained in:
parent
2b0eb0f724
commit
dd8bbfc8bd
2
caste.go
2
caste.go
|
@ -924,7 +924,7 @@ func ToStringE(i interface{}) (string, error) {
|
||||||
case int64:
|
case int64:
|
||||||
return strconv.FormatInt(s, 10), nil
|
return strconv.FormatInt(s, 10), nil
|
||||||
case int32:
|
case int32:
|
||||||
return strconv.Itoa(int(s)), nil
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
case int16:
|
case int16:
|
||||||
return strconv.FormatInt(int64(s), 10), nil
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
case int8:
|
case int8:
|
||||||
|
|
Loading…
Reference in New Issue