20
0

浮点数格式

This commit is contained in:
yezi 2016-08-12 11:17:17 +08:00
parent da346a5ffb
commit f4e2c3fa58

2
col.go
View File

@ -91,7 +91,7 @@ func (rk RK) number() (intNum int64, floatNum float64, isFloat bool) {
func (rk RK) String() string {
i, f, isFloat := rk.number()
if isFloat {
return fmt.Sprintf("%.1f", f)
return strconv.FormatFloat(f, 'f', -1, 64)
}
return strconv.FormatInt(i, 10)
}