Documentation
¶
Index ¶
- type Interactor
- type Terminal
- func (t *Terminal) Display(a ...interface{})
- func (t *Terminal) Displayf(c string, a ...interface{})
- func (t *Terminal) Displayln(a ...interface{})
- func (t *Terminal) Edit(og []byte) ([]byte, error)
- func (t *Terminal) Location() *time.Location
- func (t *Terminal) Read() (string, error)
- func (t *Terminal) ReadPassword() (string, error)
- func (t *Terminal) SetLocation(l *time.Location)
- func (t *Terminal) Wait() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interactor ¶
type Interactor interface { Wait() error Edit([]byte) ([]byte, error) Display(...interface{}) Displayf(string, ...interface{}) Displayln(...interface{}) Read() (string, error) ReadPassword() (string, error) SetLocation(*time.Location) Location() *time.Location }
Interactor is the interface that allows input/output from/to the user
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal allows command-line interaction with the user
func NewTerminal ¶
NewTerminal returns a new terminal instance with the provided editor
func (*Terminal) Displayln ¶
func (t *Terminal) Displayln(a ...interface{})
Displayln displays a string followed by a carriage return
func (*Terminal) ReadPassword ¶
ReadPassword reads from stdin, not displaying the results to the terminal, until a carriage return, then trims any whitespace
func (*Terminal) SetLocation ¶
SetLocation sets the client's local location
Click to show internal directories.
Click to hide internal directories.