Skip to content

Commit

Permalink
use base of 1024
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jun 19, 2020
1 parent d2f6b50 commit af747be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion progressbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ func average(xs []float64) float64 {

func humanizeBytes(s float64, withSuffix bool) string {
sizes := []string{" B", " kB", " MB", " GB", " TB", " PB", " EB"}
base := 1000.0
base := 1024.0
if s < 10 {
return fmt.Sprintf("%2.0f B", s)
}
Expand Down

0 comments on commit af747be

Please sign in to comment.