fix(stringx): fix reduce float

This commit is contained in:
bandl 2021-10-17 20:04:26 +08:00
parent a00f10c70e
commit 019322eb8f
1 changed files with 1 additions and 1 deletions

View File

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