fix
This commit is contained in:
parent
e917792988
commit
142ada5b07
|
@ -1,7 +1,7 @@
|
|||
package format
|
||||
|
||||
import (
|
||||
"log"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
@ -10,7 +10,7 @@ import (
|
|||
func NumToStringWithThousandthPercentile(numberStr string) string {
|
||||
numberStr = strings.TrimLeft(numberStr, "0") //去掉左边开始的0
|
||||
if _, err := strconv.ParseFloat(numberStr, 64); err != nil {
|
||||
log.Fatalln("is not a number")
|
||||
logx.Error("is not a number")
|
||||
return ""
|
||||
}
|
||||
sliceList := strings.Split(numberStr, ".") //切分开小数
|
||||
|
|
Loading…
Reference in New Issue
Block a user