Use 🛑 (red octagonal stop sign) for ERROR prefix

 is a thin black-and-white cross that gets lost against terminal
backgrounds and the ANSI red text. 🛑 is a solid red octagon that
reads unmistakably as 'stop/error' at a glance, even when the user
isn't reading the line carefully.
This commit is contained in:
2026-06-17 04:35:28 +02:00
parent fc4d0d6dc7
commit 77b9d943e4
3 changed files with 4 additions and 4 deletions

View File

@@ -119,11 +119,11 @@ func (w *Writer) Warning(format string, args ...any) {
_, _ = fmt.Fprintln(w.out, prefix+fmt.Sprintf(format, args...))
}
// Error prints " ERROR: " in red followed by the message. Goes to the
// Error prints "🛑 ERROR: " in red followed by the message. Goes to the
// same writer as everything else; callers that want stderr should
// construct a separate Writer for it.
func (w *Writer) Error(format string, args ...any) {
prefix := " " + w.paint(ansiRed+ansiBold, "ERROR: ")
prefix := "🛑 " + w.paint(ansiRed+ansiBold, "ERROR: ")
_, _ = fmt.Fprintln(w.out, prefix+fmt.Sprintf(format, args...))
}