Documentation ¶
Index ¶
- func AskKey(prefix string) (string, error)
- func AskPassword(prefix string) (string, error)
- func AskUser(prefix string) (string, error)
- func NewScan(opts Options) (string, error)
- func Scan(prefix string) (string, error)
- func ScanSecret(prefix string, substitute string, placeholder string) (string, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskPassword ¶
AskPassword is an opinionated default Password prompt like systemd-ask-password
Types ¶
type Options ¶
type Options struct { Plain bool // does not hide the password if true Prefix string // whats shown in front of the password field Substitute string // character/string shown instead of the password input Placeholder string // whats shown while there has not been user input yet BreakAt rune // character that closes/exits the prompt (def: 13 / enter) ExitOnUnprintable bool // exit with an error if an unprintable character is entered, will ignore them if false MaxLength int // maximum input length (def: none) }
Click to show internal directories.
Click to hide internal directories.