feat: improve error message for GetConfigInt64()

This commit is contained in:
Yang Luo
2025-07-09 00:32:00 +08:00
parent 146a369f80
commit 8e71e23d75

View File

@@ -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 {