mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-09-16 10:36:12 +00:00
Reduce memory usage for the 'list' subcommand
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user