Bold the startup banner on TTY; blank line after banner

This commit is contained in:
2026-06-17 05:52:03 +02:00
parent edd3e5fdb2
commit 75564a504e
3 changed files with 18 additions and 4 deletions

View File

@@ -153,10 +153,14 @@ func (w *Writer) Progress(format string, args ...any) {
w.emit(ansiWhite, " "+Marker, "", format, args)
}
// Banner prints a line with no marker, left-aligned. Used for the
// application startup banner only.
// Banner prints a line with no marker, left-aligned. Bold when color
// is enabled. Used for the application startup banner only.
func (w *Writer) Banner(format string, args ...any) {
_, _ = fmt.Fprintln(w.out, fmt.Sprintf(format, args...))
body := fmt.Sprintf(format, args...)
if w.color {
body = ansiBold + body + ansiReset
}
_, _ = fmt.Fprintln(w.out, body)
}
// emit writes "<prefix> <body>\n" with the prefix painted in prefixColor