Documentation ¶
Overview ¶
Package minterm implements minimal terminal functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPromptInterrupted = errors.New("prompt interrupted")
Functions ¶
This section is empty.
Types ¶
type MinTerm ¶
type MinTerm struct {
// contains filtered or unexported fields
}
MinTerm is a minimal terminal interface.
func New ¶
New creates a new MinTerm and opens the terminal file. Any errors that happen while opening or getting the terminal size are returned.
func (*MinTerm) Prompt ¶
Prompt gets a line of input from the terminal. It displays the text in the prompt parameter first.
func (*MinTerm) PromptPassword ¶
PromptPassword gets a line of input from the terminal, but nothing is echoed to the terminal to hide the text.
type WindowsReadWriter ¶
type WindowsReadWriter struct {
// contains filtered or unexported fields
}
terminal takes io.ReadWriter, so for windows we mash stdin and stdout back together with this.
Click to show internal directories.
Click to hide internal directories.