refactor(msg): single space between keyword and message, improve config suggestions

Tightens keyword formatting (ok/FAIL/hint/etc.) from two spaces to one.
Makes config key suggestions more generous: normalises spaces to
underscores, matches against leaf segments, and uses substring matching.
Updates all golden files.
This commit is contained in:
Lewis Wynne 2026-02-11 23:47:59 +00:00
parent db607ac696
commit c9b448d508
47 changed files with 144 additions and 118 deletions

View file

@ -49,7 +49,7 @@ func runDoctor(w io.Writer) bool {
code = "31"
hasError = true
}
fmt.Fprintf(w, "%s %s\n", keyword(code, level, tty), msg)
fmt.Fprintf(w, "%s %s\n", keyword(code, level, tty), msg)
}
tree := func(items []string) {
@ -279,7 +279,7 @@ func runDoctor(w io.Writer) bool {
if parseErrors > 0 {
emit("FAIL", fmt.Sprintf("%d store(s), %d with parse errors", len(stores), parseErrors))
} else {
emit("ok", fmt.Sprintf("%d store(s), %d key(s), %d secret(s), %s total",
emit("ok", fmt.Sprintf("%d store(s), %d key(s), %d secret(s), %s total size",
len(stores), totalKeys, totalSecrets, formatSize(int(totalSize))))
}
}