Versions in this module Expand all Collapse all v0 v0.0.1 Mar 9, 2019 Changes in this version + var ErrNotSupported = errors.New("prompt not supported") + var ErrUserCancel = errors.New("operation canceled by the user") + type ConsolePrompter struct + func Console() *ConsolePrompter + func (c ConsolePrompter) Choose(message string, choices []string, opts ...Option) (string, error) + func (c ConsolePrompter) Password(message string, opts ...Option) (string, error) + func (c ConsolePrompter) Prompt(message string, opts ...Option) (string, error) + func (c ConsolePrompter) YesNo(message string, opts ...Option) (bool, error) + type Option func(opts *options) error + func Default(s string) Option + type Prompter interface + Choose func(message string, options []string, opts ...Option) (choice int, err error) + Password func(message string, opts ...Option) (answer string, err error) + Prompt func(message string, opts ...Option) (answer string, err error) + YesNo func(message string, opts ...Option) (answer bool, err error)