From 142ada5b075003976449108dd680cd5b019802f6 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Wed, 27 Sep 2023 16:09:28 +0800 Subject: [PATCH] fix --- utils/format/number.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, ".") //切分开小数