From 019322eb8faec603cd5a6542b0e507aae220b926 Mon Sep 17 00:00:00 2001 From: bandl <1658002533@qq.com> Date: Sun, 17 Oct 2021 20:04:26 +0800 Subject: [PATCH] fix(stringx): fix reduce float --- pkg/structure/stringx/string.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/structure/stringx/string.go b/pkg/structure/stringx/string.go index 6efe942..9879237 100644 --- a/pkg/structure/stringx/string.go +++ b/pkg/structure/stringx/string.go @@ -61,7 +61,7 @@ func updateValueNotString(s *StringSingle, val int32) (string, error) { return "", err } s.val.SetFloat64(f + float64(val)) - return strconv.FormatFloat(f+1, 'f', 2, 64), nil + return strconv.FormatFloat(f+float64(val), 'f', 2, 64), nil case structure.DynamicInt: i, err := s.val.ToInt() if err != nil {