Use ratio for more accurate humanize implementation (#2121)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-08-27 13:25:32 +10:00
1 parent ae583e96d3
commit 75334c25a5
2 files changed
+12 -8

No files matched your search

-2
View File
@@ -290,7 +290,6 @@ func TestHumanize(t *testing.T) {
{1463669878895412, "1.3P"}, // 1.3 PiB
{7955158381787244544, "6.9E"}, // 6.9 EiB
{math.MaxInt64, "8.0E"}, // 8 EiB
{math.MaxUint64, "16.0E"}, // 16 EiB
}
gOpts.sizeunits = "binary"
@@ -337,7 +336,6 @@ func TestHumanize(t *testing.T) {
{1000000000, "1.0G"},
{1000000001, "1.0G"},
{math.MaxInt64, "9.2E"},
{math.MaxUint64, "18.4E"},
}
gOpts.sizeunits = "decimal"