Skip to content

Commit

Permalink
fix bitsize in parsefloat function
Browse files Browse the repository at this point in the history
  • Loading branch information
thevilledev authored and eikenb committed Dec 5, 2022
1 parent fa4686a commit 1448dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,13 +1054,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")
}
Expand Down

0 comments on commit 1448dcd

Please sign in to comment.