summaryrefslogtreecommitdiff
path: root/vendor/github.com/manifoldco/promptui/promptui.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-13 18:28:17 +0100
committerGitHub <noreply@github.com>2020-11-13 18:28:17 +0100
commit738d62ea960af439bd545820e1853cbd73464493 (patch)
tree61a859c039565897f865db052ad7c3bee8b03bfb /vendor/github.com/manifoldco/promptui/promptui.go
parent2993e97dec9d998d2eca7c5aee918b1429596a85 (diff)
parent8e4a42aa429c6dec0d5face7c69554d8a0677e96 (diff)
downloadpodman-738d62ea960af439bd545820e1853cbd73464493.tar.gz
podman-738d62ea960af439bd545820e1853cbd73464493.tar.bz2
podman-738d62ea960af439bd545820e1853cbd73464493.zip
Merge pull request #7964 from vrothberg/shortnames
short-name aliasing
Diffstat (limited to 'vendor/github.com/manifoldco/promptui/promptui.go')
-rw-r--r--vendor/github.com/manifoldco/promptui/promptui.go27
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