Documentation
¶
Overview ¶
Package term provides support functions for dealing with terminals, as commonly found on UNIX systems.
Putting a terminal into raw mode is the most common requirement:
oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
if err != nil {
panic(err)
}
defer term.Restore(int(os.Stdin.Fd()), oldState)
Note that on non-Unix systems os.Stdin.Fd() may not be 0.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSize ¶
GetSize returns the visible dimensions of the given terminal.
These dimensions don't include any scrollback buffer height.
func IsTerminal ¶
IsTerminal returns whether the given file descriptor is a terminal.
Types ¶
Click to show internal directories.
Click to hide internal directories.