cast icon indicating copy to clipboard operation
cast copied to clipboard

cast v1.5.0 bug

Open ibingbo opened this issue 2 years ago • 0 comments

func ToUint64E(i interface{}) (uint64, error) use the v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) error:strconv.ParseInt: parsing "11166014772858028509": value out of range unable to cast "11166014772858028509" of type string to uint64

case string: v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { if v < 0 { return 0, errNegativeNotAllowed } return uint64(v), nil } return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i)

ibingbo avatar Dec 07 '22 01:12 ibingbo