From f8533978de501fd07e86201566073f25f9cbe8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20T=C3=B6rh=C3=B6nen?= Date: Sun, 4 Dec 2022 18:54:36 +0200 Subject: [PATCH] fix bitsize in parsefloat function --- template/funcs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/funcs.go b/template/funcs.go index bb8725fc1..ea6e166a9 100644 --- a/template/funcs.go +++ b/template/funcs.go @@ -1052,13 +1052,13 @@ func parseBool(s string) (bool, error) { return result, nil } -// parseFloat parses a string into a base 10 float +// parseFloat parses a string into a floating-point number with 64-bit precision func parseFloat(s string) (float64, error) { if s == "" { return 0.0, nil } - result, err := strconv.ParseFloat(s, 10) + result, err := strconv.ParseFloat(s, 64) if err != nil { return 0, errors.Wrap(err, "parseFloat") }