internal

package
v2.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 GetConfirm(ui *input.UI, promptFunc func() string) bool

func GetInput

func GetInput(ui *input.UI, prompt, defaultValue string) string

func GetPassword

func GetPassword(ui *input.UI, showNew bool) (password string)

func GetSecret

func GetSecret(ui *input.UI) (secret string)

func PromptWithColor

func PromptWithColor(s string, color []byte) []byte

func RawDurationToTimeDuration

func RawDurationToTimeDuration(raw string) (time.Duration, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL