Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Reset string Bright string Bold string Dim string Italic string Under string Blink string BlinkF string Reverse string Hidden string Strike string BoldItalic string Black string Red string Green string Yellow string Blue string Magenta string Cyan string White string BBlack string BRed string BGreen string BYellow string BBlue string BMagenta string BCyan string BWhite string HBlack string HRed string HGreen string HYellow string HBlue string HMagenta string HCyan string HWhite string BHBlack string BHRed string BHGreen string BHYellow string BHBlue string BHMagenta string BHCyan string BHWhite string X string B string I string U string BI string )
Functions ¶
func AttrOff ¶
func AttrOff()
AttrOff sets all the terminal attributes to zero values (empty strings). Note that this does not affect anything in the esc subpackage (which contains the constants from the VT100 specification).
func AttrOn ¶
func AttrOn()
AttrOn sets all the terminal attributes to zero values (empty strings). Note that this does not affect anything in the esc subpackage (which contains the constants from the VT100 specification).
func IsInteractive ¶
func IsInteractive() bool
IsInteractive returns true if the output is to an interactive terminal (not piped in any way). This is useful when determining if an extra line return is needed to avoid making programs chomp the line returns unnecessarily.
func Read ¶ added in v0.1.1
func Read() string
Read reads a single line of input and chomps the \r?\n. Also see ReadHidden.
func ReadHidden ¶ added in v0.1.1
func ReadHidden() string
ReadHidden disables the cursor and echoing to the screen and reads a single line of input. Leading and trailing whitespace are removed. Also see Read.
func WinSizeUpdate ¶
func WinSizeUpdate()
Types ¶
type WinSizeStruct ¶
WinSizeStruct is the exact struct used by the ioctl system library.
var WinSize WinSizeStruct
WinSize is 80x24 by default but is detected and set to a more accurate value at init() time on systems that support ioctl (currently) and can be updated with WinSizeUpdate on systems that support it. This value can be overriden by those wishing a more consistent value or who prefer not to fill the screen completely when displaying help and usage information.