terminal

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL