Versions in this module Expand all Collapse all v2 v2.3.5 Mar 16, 2026 Changes in this version + const ERR + const OK + func AnswerIsYes(defVal ...bool) bool + func Ask(question, defVal string, fn func(ans string) error, maxTimes ...int) string + func Checkbox(title string, options interface{}, defOpts []string, allowQuit ...bool) []string + func Choice(title string, options interface{}, defOpt string, allowQuit ...bool) string + func Confirm(message string, defVal ...bool) bool + func GetHiddenInput(message string, trimmed bool) string + func MultiSelect(title string, options interface{}, defOpts []string, allowQuit ...bool) []string + func Prompt(ctx context.Context, query, defaultAnswer string) (string, error) + func Query(question, defVal string, fn func(ans string) error, maxTimes ...int) string + func ReadFirst(question string) (string, error) + func ReadInput(question string) (string, error) + func ReadLine(question string) (string, error) + func ReadPassword(question ...string) string + func SelectOne(title string, options interface{}, defOpt string, allowQuit ...bool) string + func SingleSelect(title string, options interface{}, defOpt string, allowQuit ...bool) string + func Unconfirmed(message string, defVal ...bool) bool + type Interactive struct + Name string + func New(name string) *Interactive + type Option struct + DefVal string + Quit bool + type Question struct + DefVal string + Func func(ans string) error + MaxTimes int + Q string + func NewQuestion(q string, defVal ...string) *Question + func (q *Question) Run() *Value + type RunFace interface + Run func() *Value + type Select struct + DefOpt string + DefOpts []string + DisableQuit bool + MultiSelect bool + Options interface{} + Title string + func NewSelect(title string, options interface{}) *Select + func (s *Select) Run() *SelectResult + type SelectResult struct + K Value + func (sv *SelectResult) Key() interface{} + func (sv *SelectResult) KeyString() string + func (sv *SelectResult) KeyStrings() []string + func (sv *SelectResult) WithKey(key interface{}) *SelectResult + type StepHandler func(ctx context.Context) error + type StepsRun struct + Steps []StepHandler + func (s *StepsRun) Err() error + func (s *StepsRun) Run() + func (s *StepsRun) Stop() + type Value struct + func (v Value) Int() (val int) + func (v Value) IsEmpty() bool + func (v Value) Set(val interface{}) + func (v Value) String() string + func (v Value) Strings() (ss []string) + func (v Value) Val() interface{}