Documentation
¶
Index ¶
- type In
- func (i *In) CheckTty(attachStdin, ttyMode bool) error
- func (i *In) Close() error
- func (i *In) FD() uintptr
- func (i *In) File() (*os.File, bool)
- func (i *In) IsTerminal() bool
- func (i *In) Read(p []byte) (int, error)
- func (i *In) RestoreTerminal()
- func (i *In) SetIsTerminal(isTerminal bool)
- func (i *In) SetRawTerminal() error
- type Out
- func (o *Out) FD() uintptr
- func (o *Out) File() (*os.File, bool)
- func (o *Out) GetTtySize() (height uint, width uint)
- func (o *Out) IsTerminal() bool
- func (o *Out) RestoreTerminal()
- func (o *Out) SetIsTerminal(isTerminal bool)
- func (o *Out) SetRawTerminal() error
- func (o *Out) Write(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type In ¶
type In struct {
// contains filtered or unexported fields
}
In is an input stream to read user input. It implements io.ReadCloser with additional utilities, such as putting the terminal in raw mode.
func NewIn ¶
func NewIn(in io.ReadCloser) *In
NewIn returns a new In from an io.ReadCloser. If in is an *os.File, a reference is kept to the file, and accessible through In.File.