Skip to content

Commit 096e380

Browse files
author
furiosa
committed
docs: document error handling pattern in style.go (gt-du7ic)
1 parent 9b2a1c4 commit 096e380

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/style/style.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ var (
2121
Bold(true)
2222

2323
// Error style for failures (red)
24+
// Error handling pattern: Use Error.Render(message) for error text,
25+
// or ErrorPrefix + message for icon-prefixed errors. For user-facing
26+
// errors, prefer fmt.Printf("%s %s\n", ErrorPrefix, Error.Render(msg))
27+
// to maintain consistent formatting across the codebase.
2428
Error = lipgloss.NewStyle().
2529
Foreground(ui.ColorFail).
2630
Bold(true)

0 commit comments

Comments
 (0)