Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTerminalWidth ¶ added in v1.1.0
func GetTerminalWidth() int
GetTerminalWidth tries to figure out the width of the terminal and returns it returns 0 if there are problems in getting the width.
func IsStderrTerminal ¶
func IsStderrTerminal() bool
IsStderrTerminal returns true if the terminal is stderr
func IsStdoutTerminal ¶
func IsStdoutTerminal() bool
IsStdoutTerminal returns true if the terminal is stdout
Types ¶
type ResizeListener ¶ added in v1.1.0
type ResizeListener struct {
// contains filtered or unexported fields
}
ResizeListener calls given callback function when terminal window is resized. This is currently a no-op in Windows.
func NewResizeListener ¶ added in v1.1.0
func NewResizeListener(callback func()) *ResizeListener
NewResizeListener creates a new ResizeListener
func (*ResizeListener) Close ¶ added in v1.1.0
func (s *ResizeListener) Close()
Close stops ResizeListener listening and cleans up associated resources
Click to show internal directories.
Click to hide internal directories.