From 77b9d943e42c04e4d26a29932c5099695406d992 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 17 Jun 2026 04:35:28 +0200 Subject: [PATCH] =?UTF-8?q?Use=20=F0=9F=9B=91=20(red=20octagonal=20stop=20?= =?UTF-8?q?sign)=20for=20ERROR=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ❌ 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. --- README.md | 2 +- internal/ui/ui.go | 4 ++-- internal/ui/ui_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1e6b23e..bce272e 100644 --- a/README.md +++ b/README.md @@ -405,7 +405,7 @@ Message classes: | Info | `》` (white) | column 0 | Neutral status update | | Notice | `》` (cyan) | column 0 | Important note that is not a warning | | Warning | `⚠️ Warning:` (orange/yellow) | column 0 | Recoverable problem | -| Error | `❌ ERROR:` (red) | column 0 | Operation aborted | +| Error | `🛑 ERROR:` (red) | column 0 | Operation aborted | | Progress | ` 》` (white) | column 2 | Heartbeat or per-item status during a long-running operation | Conventions: diff --git a/internal/ui/ui.go b/internal/ui/ui.go index dc7f374..354949b 100644 --- a/internal/ui/ui.go +++ b/internal/ui/ui.go @@ -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...)) } diff --git a/internal/ui/ui_test.go b/internal/ui/ui_test.go index 28860a1..08999df 100644 --- a/internal/ui/ui_test.go +++ b/internal/ui/ui_test.go @@ -23,7 +23,7 @@ func TestMessageMethodsPlain(t *testing.T) { {"Info", func(w *Writer) { w.Info("status") }, "》 status\n"}, {"Notice", func(w *Writer) { w.Notice("note") }, "》 note\n"}, {"Warning", func(w *Writer) { w.Warning("oops") }, "⚠️ Warning: oops\n"}, - {"Error", func(w *Writer) { w.Error("boom") }, "❌ ERROR: boom\n"}, + {"Error", func(w *Writer) { w.Error("boom") }, "🛑 ERROR: boom\n"}, {"Progress", func(w *Writer) { w.Progress("p") }, " 》 p\n"}, {"Banner", func(w *Writer) { w.Banner("hello") }, "hello\n"}, }