Documentation ¶
Index ¶
- func DimensionsOrDefault(twidth, theight, defaultwidth, defaultheight int) (width, height int)
- func DimensionsOrMin(twidth, theight, minwidth, minheight int) (width, height int)
- func GetFDDimensions(fd uintptr) (width, height int, err error)
- func GetFileDimensions(f *os.File) (width, height int, err error)
- func GetStderrDimensions() (width, height int, err error)
- func GetStdoutDimensions() (width, height int, err error)
- func IsFDTerminal(fd uintptr) bool
- func IsFileTerminal(f *os.File) bool
- func IsStderrTerminal() bool
- func IsStdoutTerminal() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DimensionsOrDefault ¶
DimensionsOrDefault is a helper method to use default dimensions rather than the output dimensions in cases where there was an error reading the dimensions.
func DimensionsOrMin ¶
DimensionsOrMin is a helper method to use minimum dimensions rather than the output dimensions in cases where there was an error or the dimensions were smaller than expected.
func GetFDDimensions ¶
GetFDDimensions returns the dimensions of the given terminal.
func GetFileDimensions ¶
GetFileDimensions returns the dimensions of the given file by looking at its file descriptor.
func GetStderrDimensions ¶
GetStderrDimensions returns the dimensions of the stderr
func GetStdoutDimensions ¶
GetStdoutDimensions returns the dimensions of the stdout
func IsFDTerminal ¶
IsFDTerminal returns true if the given file descriptor is a terminal. This is borrowed from golang/crypto/blob/master/ssh/terminal/util.go
func IsFileTerminal ¶
IsFileTerminal returns true if the given file's descriptor is a terminal
func IsStderrTerminal ¶
func IsStderrTerminal() bool
IsStderrTerminal returns true if os.Stderr is a terminal
func IsStdoutTerminal ¶
func IsStdoutTerminal() bool
IsStdoutTerminal returns true if os.Stdout is a terminal
Types ¶
This section is empty.