Commit 888fe5c
fix: decimal formatting issues (#14)
* Fix decimal formatting issues and test. The 'frac' component won't always be zero due to floating point but strconv.FormatFloat will round to 3 places and can output a whole number. Checking for a decimal at the end is more reliable to detect the rounding
* fix: use strings.HasSuffix for clarity
---------
Co-authored-by: Lee <lee@ip-192-168-193-193.us-west-2.compute.internal>
Co-authored-by: Kévin Dunglas <kevin@dunglas.dev>1 parent 4cd96ca commit 888fe5c
1 file changed
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
36 | | - | |
| 37 | + | |
37 | 38 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
0 commit comments