Documentation
¶
Overview ¶
Package terminal provides terminal detection and capabilities.
This package handles:
- TTY detection for stdout/stderr
- NO_COLOR environment variable support
- Terminal dimensions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
IsTTY bool
NoColor bool
Width int
Height int
ForceFlag bool // Set when --no-color flag is used
}
Info holds terminal capability information.
func (*Info) ColorEnabled ¶
ColorEnabled returns true if colored output should be used.
func (*Info) InteractiveEnabled ¶
InteractiveEnabled returns true if interactive prompts are allowed.
func (*Info) SpinnersEnabled ¶
SpinnersEnabled returns true if spinners should be used.