We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5896f70 commit b8ba4a9Copy full SHA for b8ba4a9
format/long.go
@@ -59,15 +59,16 @@ func extractValues(node node.Node) []string {
59
strconv.Itoa(node.LinkCount),
60
fmt.Sprintf("%s ", node.User),
61
fmt.Sprintf("%s ", node.Group),
62
- colorSize(node.Size, humanize.Bytes(node.Size)),
+ formatSize(node.Size),
63
node.Time.Month().String()[:3],
64
fmt.Sprintf("%2d", node.Time.Day()),
65
fmt.Sprintf("%02d:%02d", node.Time.Hour(), node.Time.Minute()),
66
fmt.Sprintf(" %s", node.Name),
67
}
68
69
70
-func colorSize(sizeInt int, str string) string {
+func formatSize(sizeInt int) string {
71
+ str := humanize.Bytes(sizeInt)
72
size := float64(sizeInt)
73
base := float64(1024)
74
// less than 1K
0 commit comments