MCPcopy Create free account
hub / github.com/github/gh-aw / RenderErrorBox

Function RenderErrorBox

pkg/console/console.go:415–429  ·  view source on GitHub ↗

RenderErrorBox renders an error/warning message with a rounded border box

(title string)

Source from the content-addressed store, hash-verified

413
414// RenderErrorBox renders an error/warning message with a rounded border box
415func RenderErrorBox(title string) []string {
416 if tty.IsStderrTerminal() {
417 box := lipgloss.NewStyle().
418 Border(styles.RoundedBorder).
419 BorderForeground(styles.ColorError).
420 Padding(1, 2).
421 Bold(true).
422 Render(title)
423 return []string{box}
424 }
425
426 return []string{
427 FormatErrorMessage(title),
428 }
429}
430
431// RenderInfoSection renders an info section with left border emphasis
432func RenderInfoSection(content string) []string {

Callers 2

TestRenderErrorBoxFunction · 0.70

Calls 3

IsStderrTerminalFunction · 0.92
FormatErrorMessageFunction · 0.70
RenderMethod · 0.65

Tested by 2

TestRenderErrorBoxFunction · 0.56