Documentation ¶
Index ¶
- Constants
- Variables
- func GetConfirm(ui *input.UI, promptFunc func() string) bool
- func GetInput(ui *input.UI, prompt, defaultValue string) string
- func GetPassword(ui *input.UI, showNew bool) (password string)
- func GetSecret(ui *input.UI) (secret string)
- func PromptWithColor(s string, color []byte) []byte
- func RawDurationToTimeDuration(raw string) (time.Duration, error)
Constants ¶
View Source
const MinPasswordLen int = 8
Variables ¶
View Source
var ( ErrPasswordNotMatch = fmt.Errorf("passwords do not match") ErrPasswordIsTooShort = fmt.Errorf("password is too short") )
View Source
var ( KeyEscape = byte(27) ColorRed = []byte{KeyEscape, '[', '3', '1', 'm'} ColorYellow = []byte{KeyEscape, '[', '3', '3', 'm'} ColorCyan = []byte{KeyEscape, '[', '3', '6', 'm'} KeyReset = []byte{KeyEscape, '[', '0', 'm'} )
vt100EscapeCodes
Functions ¶
func GetConfirm ¶
func GetPassword ¶
func PromptWithColor ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.