Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInterrupted = errors.New("interrupted") ErrMaxLengthExceeded = fmt.Errorf("maximum byte limit (%v) exceeded", maxLength) )
Functions ¶
func GetPasswd ¶
GetPasswd returns the password read from the terminal without echoing input. The returned byte array does not include end-of-line characters.
func GetPasswdMasked ¶
GetPasswdMasked returns the password read from the terminal, echoing asterisks. The returned byte array does not include end-of-line characters.
func GetPasswdPrompt ¶
GetPasswdPrompt prompts the user and returns the password read from the terminal. If mask is true, then asterisks are echoed. The returned byte array does not include end-of-line characters.
Types ¶
type CleartextReader ¶
func NewCleartextReader ¶
func NewCleartextReader() *CleartextReader
func (*CleartextReader) ReadSlice ¶
func (c *CleartextReader) ReadSlice() ([]byte, error)
ReadSlice returns a line of input read from terminal, interruptable by ctrl-c. If prompt is not empty, it will be output as a prompt to the user
func (*CleartextReader) SetPrompt ¶
func (c *CleartextReader) SetPrompt(s string)
SetPrompt changes the user prompt to s.
Click to show internal directories.
Click to hide internal directories.