cast
cast copied to clipboard
cast.ToInt64E("16025123132364928") return 0
parser string to int64 should use strconv.ParseInt(trimZeroDecimal(s), 10, 64) not the follow; v, err := strconv.ParseInt(trimZeroDecimal(s), 0, 0) if err == nil { return v, nil }
parsing string ”08“ is the same problem return 0 s := "08" fmt.Println(strconv.Atoi(s)) // 8, nil fmt.Println(cast.ToInt(s)) //0