var ErrInvalidState … type terminalState … func stdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { … } func getFdInfo(in interface{ … } func getWinsize(fd uintptr) (*Winsize, error) { … } func setWinsize(fd uintptr, ws *Winsize) error { … } func isTerminal(fd uintptr) bool { … } func restoreTerminal(fd uintptr, state *State) error { … } func saveState(fd uintptr) (*State, error) { … } func disableEcho(fd uintptr, state *State) error { … } func setRawTerminal(fd uintptr) (*State, error) { … } func setRawTerminalOutput(fd uintptr) (*State, error) { … } func tcget(fd uintptr) (*unix.Termios, error) { … } func tcset(fd uintptr, p *unix.Termios) error { … }