mirror of https://github.com/spf13/cast.git
parent
487df00934
commit
fb4c12e8e0
2
caste.go
2
caste.go
|
@ -613,7 +613,7 @@ func ToUint64E(i interface{}) (uint64, error) {
|
||||||
|
|
||||||
switch s := i.(type) {
|
switch s := i.(type) {
|
||||||
case string:
|
case string:
|
||||||
v, err := strconv.ParseUint(trimZeroDecimal(s), 0, 0)
|
v, err := strconv.ParseUint(trimZeroDecimal(s), 10, 64)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if v < 0 {
|
if v < 0 {
|
||||||
return 0, errNegativeNotAllowed
|
return 0, errNegativeNotAllowed
|
||||||
|
|
Loading…
Reference in New Issue