From 99668401144105815d6dade92a70920416f017f1 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Mon, 25 Apr 2022 12:08:56 +0800 Subject: [PATCH] code refactor --- pkg/conv/conv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/conv/conv.go b/pkg/conv/conv.go index 2b7c598..6196fb0 100644 --- a/pkg/conv/conv.go +++ b/pkg/conv/conv.go @@ -63,6 +63,6 @@ func ToFloat64(val interface{}) (float64, error) { case float32: return float64(v), nil default: - return 0, fmt.Errorf("unparseable value %v", v) + return strconv.ParseFloat(fmt.Sprint(v), 64) } }