Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EnvironmentOverrideColors bool DisableColors bool // no colorful paint? false to disable colorful paint. ForceColors bool // always colorful paint? true to enable colorful paint even if the underlying tty cannot support ANSI escaped sequences. )
Functions ¶
func GetTtySize ¶
func GetTtySize() (cols, rows int)
GetTtySize returns the window size in columns and rows in the active console window. The return value of this function is in the order of cols, rows.
func IsColored ¶
IsColored detects a writer if it is a colorful tty device.
A colorful tty device can receive ANSI escaped sequences and draw its.
func IsTtyEscaped ¶
IsTtyEscaped detects a string if it contains ansi color escaped sequences
func ReadPassword ¶
ReadPassword reads the password from stdin with safe protection
func StripEscapes ¶
StripEscapes removes any ansi color escaped sequences from a string
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.