Documentation
¶
Index ¶
- type Prompter
- func (p *Prompter) Ask(label, defaultValue string) (string, error)
- func (p *Prompter) Confirm(label string, defaultValue bool) (bool, error)
- func (p *Prompter) MultiInput(label string) ([]string, error)
- func (p *Prompter) MultiSelect(label string, options []string, defaultAll bool) ([]string, error)
- func (p *Prompter) MultiSelectWithDefaults(label string, options []string, defaultIndices []int) ([]string, error)
- func (p *Prompter) Select(label string, options []string, defaultIndex int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Prompter ¶
type Prompter struct {
// contains filtered or unexported fields
}
Prompter wraps I/O for interactive prompts.
func NewPrompter ¶
NewPrompter returns a Prompter backed by the provided reader and writer.
func (*Prompter) MultiInput ¶
MultiInput collects multiple values until the user enters an empty line.
func (*Prompter) MultiSelect ¶
MultiSelect presents a numbered list and returns the selected items.
Click to show internal directories.
Click to hide internal directories.