prompt

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUserNoContinue = "prompt.user_no_continue"
	ErrUserCtrlC      = "prompt.user_ctrl_c"
)

Variables

This section is empty.

Functions

func ErrorUserCtrlC added in v0.15.0

func ErrorUserCtrlC() error

func ErrorUserNoContinue added in v0.15.0

func ErrorUserNoContinue() error

func Prompt

func Prompt(opts *Options) string

func YesOrExit

func YesOrExit(prompt string, yesMessage string, noMessage string)

func YesOrNo added in v0.13.0

func YesOrNo(prompt string, yesMessage string, noMessage string) bool

Types

type Options

type Options struct {
	Prompt              string
	DefaultStr          string
	HideDefault         bool
	MaskDefault         bool
	HideTyping          bool
	MaskTyping          bool
	TypingMaskVal       string
	SkipTrailingNewline bool
}

Jump to

Keyboard shortcuts

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