Reduce memory usage for the 'list' subcommand

This commit is contained in:
2025-12-26 12:34:08 +02:00
parent a660039be1
commit 548b2476bd
6 changed files with 88 additions and 87 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ func stringSliceRemove(s []string, r string) []string {
return s
}
func bytesToHumanReadable(b int64) string {
func BytesToHumanReadable(b int64) string {
bf := float64(b)
for _, unit := range []string{"", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"} {
if math.Abs(bf) < 1024.0 {