浮点数格式
This commit is contained in:
parent
da346a5ffb
commit
f4e2c3fa58
2
col.go
2
col.go
@ -91,7 +91,7 @@ func (rk RK) number() (intNum int64, floatNum float64, isFloat bool) {
|
|||||||
func (rk RK) String() string {
|
func (rk RK) String() string {
|
||||||
i, f, isFloat := rk.number()
|
i, f, isFloat := rk.number()
|
||||||
if isFloat {
|
if isFloat {
|
||||||
return fmt.Sprintf("%.1f", f)
|
return strconv.FormatFloat(f, 'f', -1, 64)
|
||||||
}
|
}
|
||||||
return strconv.FormatInt(i, 10)
|
return strconv.FormatInt(i, 10)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user