From 8e71e23d75914dfeca503f8496005d1a479856b3 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 9 Jul 2025 00:32:00 +0800 Subject: [PATCH] feat: improve error message for GetConfigInt64() --- conf/conf.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/conf.go b/conf/conf.go index 6e36b6b9..31364d46 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -66,7 +66,11 @@ func GetConfigBool(key string) bool { func GetConfigInt64(key string) (int64, error) { value := GetConfigString(key) num, err := strconv.ParseInt(value, 10, 64) - return num, err + if err != nil { + return 0, fmt.Errorf("GetConfigInt64(%s) error, %s", key, err.Error()) + } + + return num, nil } func GetConfigDataSourceName() string {