diff --git a/utils/format/number.go b/utils/format/number.go index a4a0b2ec..dec25c3c 100644 --- a/utils/format/number.go +++ b/utils/format/number.go @@ -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, ".") //切分开小数