add a 'B' suffix to files under a thousand bytes

Mentioned in #49.
This commit is contained in:
Gokcehan committed 2017-01-08 19:24:28 +03:00
1 parent 7c800cc373
commit 90e3a22dc8
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -140,7 +140,7 @@ func splitWord(s string) (word, rest string) {
// smaller values but it should be fine for most human beings.
func humanize(size int64) string {
if size < 1000 {
return fmt.Sprintf("%d", size)
return fmt.Sprintf("%dB", size)
}
suffix := []string{