Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvNoColor = "NO_COLOR" EnvForceColor = "FORCE_COLOR" EnvForceTTY = "FORCE_TTY" )
Environment variables to control TUI output behavior.
Precedence (highest first):
- NO_COLOR -> disable color + control sequences
- FORCE_TTY -> enable color + control sequences
- FORCE_COLOR -> enable color, control sequences follow TTY detection
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModeProvider ¶
type ModeProvider interface {
TUIMode() OutputMode
}
ModeProvider allows a writer to declare its effective output mode.
This is useful for writer wrappers that preserve the underlying terminal capability (e.g. progress UI writers).
type OutputMode ¶
OutputMode controls what kind of output is allowed for a writer.
Color: whether ANSI styling (colors/bold) is allowed. Control: whether ANSI control sequences that rewrite the terminal output (spinners, multi-line live updates) are allowed.
func Resolve ¶
func Resolve(out io.Writer) OutputMode
Resolve resolves the effective output mode for the given writer.
func ResolveFile ¶
func ResolveFile(out *os.File) OutputMode
ResolveFile is like Resolve but specialized for *os.File.
Click to show internal directories.
Click to hide internal directories.