Fail loudly on a touch read, stop the workers before their sockets close, and file down the small edges

This commit is contained in:
flamingcow
2026-08-04 22:26:07 -07:00
parent 12cef6a89b
commit 7b2601a02e
5 changed files with 38 additions and 20 deletions
+3 -1
View File
@@ -75,8 +75,10 @@ func commas(v uint64) string {
// 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 {
// %.2f rounds 999.995 and up to a fourth digit, so the magnitude rolls over
// where the rounding does rather than at the bare thousand.
for _, mag := range []string{"", "k", "M", "G", "T"} {
if v < 1000 {
if v < 999.995 {
if mag == "" {
return fmt.Sprintf("%.2f", v)
}