From c2e3a59ebc09e1d7a93bd6cf2b81cfbab3ba2850 Mon Sep 17 00:00:00 2001 From: ymh199478 Date: Tue, 13 Jul 2021 11:21:39 +0800 Subject: [PATCH] fix(config): strconv.ParseFloat use correct bitSize --- config/value.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/value.go b/config/value.go index a3e237981..c087c3ed2 100644 --- a/config/value.go +++ b/config/value.go @@ -68,8 +68,7 @@ func (v *atomicValue) Float() (float64, error) { case int64: return float64(val), nil case string: - //todo: SA1030: 'bitSize' argument is invalid, must be either 32 or 64 - return strconv.ParseFloat(val, 10) //nolint: staticcheck + return strconv.ParseFloat(val, 64) } return 0.0, fmt.Errorf("type assert to %v failed", reflect.TypeOf(v.Load())) }