unknwon / com

This is an open source project for commonly used functions for the Go programming language.
Apache License 2.0
755 stars 133 forks source link

strconv.ParseInt 转换问题 #7

Closed beikege closed 9 years ago

beikege commented 9 years ago

https://github.com/Unknwon/com/blob/master/convert.go#L35 strconv.ParseInt(f.String(), 10, 32) 不应该用 32,不然64位程序int类型的最大值被固定为int32类型的最大值,应该是用0. strconv.ParseInt(f.String(), 10, 0)