aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/progress/humanize.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/progress/humanize.go b/internal/progress/humanize.go
index 8363d6b1..fd68e1e9 100644
--- a/internal/progress/humanize.go
+++ b/internal/progress/humanize.go
@@ -10,7 +10,7 @@ func humanizeBytes(n uint64) string {
value := float64(n)
units := []string{"KiB", "MiB", "GiB", "TiB", "PiB"}
- for i := 0; i < len(units); i++ {
+ for i := range units {
value /= unit
if value < unit || i == len(units)-1 {
return fmt.Sprintf("%.2f %s", value, units[i])