Cut the comments back to the genuinely subtle ones
This commit is contained in:
@@ -89,10 +89,9 @@ func humanBytes(b uint64) string {
|
||||
return fmt.Sprintf("%.1f PB", v)
|
||||
}
|
||||
|
||||
// A figure with the letter for its magnitude, so the unit itself can stay a
|
||||
// fixed word on the label and only the letter moves with the value. Below a
|
||||
// thousand there is no letter and none is left dangling, since a trailing space
|
||||
// would push the figure off centre.
|
||||
// The magnitude letter goes with the figure so the unit can stay a fixed word
|
||||
// on the label. Below a thousand no letter is left dangling, since a trailing
|
||||
// space would push the figure off centre.
|
||||
func scaleSI(v float64) string {
|
||||
for _, mag := range []string{"", "k", "M", "G", "T"} {
|
||||
if v < 1000 {
|
||||
@@ -106,8 +105,7 @@ func scaleSI(v float64) string {
|
||||
return fmt.Sprintf("%.2f P", v)
|
||||
}
|
||||
|
||||
// The same shape for time, whose magnitudes are sixties and twenty-fours rather
|
||||
// than thousands. The letter changes with the value; the label does not.
|
||||
// The same shape for time, whose magnitudes are sixties and twenty-fours.
|
||||
func scaleTime(d time.Duration) string {
|
||||
switch {
|
||||
case d < time.Minute:
|
||||
@@ -242,9 +240,8 @@ func renderBox(title string, headers []string, rights []bool, rows [][]string) s
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// Counted exactly rather than scaled: these are whole frames, and the figure
|
||||
// that matters most is the small one. Scaled, a single lost frame and a
|
||||
// thousand of them both read as 1.00, separated only by a letter.
|
||||
// Exact rather than scaled: scaled, one lost frame and a thousand both read as
|
||||
// 1.00, separated only by a letter.
|
||||
func statusCell(v uint64) string {
|
||||
s := commas(v)
|
||||
if v == 0 {
|
||||
|
||||
Reference in New Issue
Block a user