From 8b88beae884cce7b78306c46342f5a7334496ed8 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 30 Jun 2024 13:24:50 -0400 Subject: [PATCH] fix bug after adding suffix code --- pretty/pretty.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pretty/pretty.go b/pretty/pretty.go index 1d823a5..94b0f12 100644 --- a/pretty/pretty.go +++ b/pretty/pretty.go @@ -62,7 +62,6 @@ func multiplyOrPassThroughError(a float64, b float64, err error) (float64, error func ParseFloat(word string) (float64, error) { // l = len(word) // assuming no UTF stuff - switch len(word) { case 0: return 0, errors.New("String to be parsed into float must not be the empty string") @@ -82,7 +81,7 @@ func ParseFloat(word string) (float64, error) { case 'T': return multiplyOrPassThroughError(1_000_000_000_000, f, err) default: - return f, err + return strconv.ParseFloat(word, 64) } }