Documentation ¶
Index ¶
- Variables
- type IO
- type Rline
- func (l *Rline) Close() error
- func (l *Rline) Cygwin() bool
- func (l *Rline) ForceIntCyg(interactive, cygwin bool)
- func (l *Rline) Interactive() bool
- func (l *Rline) Next() ([]rune, error)
- func (l *Rline) Password() (string, error)
- func (l *Rline) Prompt(s string)
- func (l *Rline) Save(s string) error
- func (l *Rline) Stderr() io.Writer
- func (l *Rline) Stdout() io.Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInterrupt is the interrupt error. ErrInterrupt = readline.ErrInterrupt // ErrNotInteractive is the not interactive error. ErrNotInteractive = errors.New("not interactive") )
Functions ¶
This section is empty.
Types ¶
type IO ¶
type IO interface { // Next returns the next line of runes (excluding '\n') from the input. Next() ([]rune, error) // Close closes the IO. Close() error // Stdout is the IO's standard out. Stdout() io.Writer // Stderr is the IO's standard error out. Stderr() io.Writer // Interactive determines if the IO is an interactive terminal. Interactive() bool // Cygwin determines if the IO is a Cygwin interactive terminal. Cygwin() bool // Prompt sets the prompt for the next interactive line read. Prompt(string) // Save saves a line of history. Save(string) error // Password prompts for a password. Password() (string, error) // ForceIntCyg forces the interactive and cygwin values. ForceIntCyg(bool, bool) }
IO is the common input/output interface.
type Rline ¶
type Rline struct { N func() ([]rune, error) C func() error //In io.Reader Out io.Writer Err io.Writer Int bool Cyg bool P func(string) S func(string) error Pw func() (string, error) }
Rline provides a type compatible with the IO interface.
func (*Rline) ForceIntCyg ¶
ForceIntCyg forces the interactive and cygwin values.
func (*Rline) Interactive ¶
Interactive determines if the IO is an interactive terminal.
Click to show internal directories.
Click to hide internal directories.