Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
func IsTerminal(f FileDescriptor) bool
IsTerminal returns true if the given file descriptor is a terminal.
func OpenOutput ¶
OpenOutput tries to get write access to the process' terminal.
func Restore ¶
func Restore(f FileDescriptor, state *State) error
Restore restores the terminal connected to the given file descriptor to a previous state.
Types ¶
type FileDescriptor ¶
type FileDescriptor interface {
Fd() uintptr
}
type State ¶
type State struct {
// contains filtered or unexported fields
}
State contains the state of a terminal.
func DisableFlags ¶
func DisableFlags(f FileDescriptor, flags Flag) (*State, error)
DisableFlags disables the terminal flags specified in the function argument 'flags', and returns the previous state of the terminal so that it can be restored.
Click to show internal directories.
Click to hide internal directories.