diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-10-07 16:58:53 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-11-13 15:40:06 +0100 |
commit | 8e4a42aa429c6dec0d5face7c69554d8a0677e96 (patch) | |
tree | bbfff77e7b32a8b46af6f57d42965a7751bec18e /vendor/github.com/manifoldco/promptui/promptui.go | |
parent | 0b1a60ec27928a40ac827148c1517098612616bd (diff) | |
download | podman-8e4a42aa429c6dec0d5face7c69554d8a0677e96.tar.gz podman-8e4a42aa429c6dec0d5face7c69554d8a0677e96.tar.bz2 podman-8e4a42aa429c6dec0d5face7c69554d8a0677e96.zip |
short-name aliasing
Add support for short-name aliasing.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/manifoldco/promptui/promptui.go')
-rw-r--r-- | vendor/github.com/manifoldco/promptui/promptui.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/github.com/manifoldco/promptui/promptui.go b/vendor/github.com/manifoldco/promptui/promptui.go new file mode 100644 index 000000000..6248e5859 --- /dev/null +++ b/vendor/github.com/manifoldco/promptui/promptui.go @@ -0,0 +1,27 @@ +// Package promptui is a library providing a simple interface to create command-line prompts for go. +// It can be easily integrated into spf13/cobra, urfave/cli or any cli go application. +// +// promptui has two main input modes: +// +// Prompt provides a single line for user input. It supports optional live validation, +// confirmation and masking the input. +// +// Select provides a list of options to choose from. It supports pagination, search, +// detailed view and custom templates. +package promptui + +import "errors" + +// ErrEOF is the error returned from prompts when EOF is encountered. +var ErrEOF = errors.New("^D") + +// ErrInterrupt is the error returned from prompts when an interrupt (ctrl-c) is +// encountered. +var ErrInterrupt = errors.New("^C") + +// ErrAbort is the error returned when confirm prompts are supplied "n" +var ErrAbort = errors.New("") + +// ValidateFunc is a placeholder type for any validation functions that validates a given input. It should return +// a ValidationError if the input is not valid. +type ValidateFunc func(string) error |