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

Function applyStyleWithTTY

pkg/console/console.go:37–42  ·  view source on GitHub ↗

applyStyleWithTTY conditionally applies styling based on a provided TTY check.

(style lipgloss.Style, text string, ttyCheck func() bool)

Source from the content-addressed store, hash-verified

35
36// applyStyleWithTTY conditionally applies styling based on a provided TTY check.
37func applyStyleWithTTY(style lipgloss.Style, text string, ttyCheck func() bool) string {
38 if ttyCheck() {
39 return style.Render(text)
40 }
41 return text
42}
43
44// FormatError formats a CompilerError with Rust-like rendering
45func FormatError(err CompilerError) string {

Callers 5

applyStyleFunction · 0.85
formatInfoMessageWithTTYFunction · 0.85
formatListItemWithTTYFunction · 0.85

Calls 1

RenderMethod · 0.65

Tested by

no test coverage detected