Prompt prompts for a variable value, using Select if enum is provided, Text otherwise
(varName string, enum []string)
| 78 | |
| 79 | // Prompt prompts for a variable value, using Select if enum is provided, Text otherwise |
| 80 | func (p *Prompter) Prompt(varName string, enum []string) (string, error) { |
| 81 | if len(enum) > 0 { |
| 82 | return p.Select(varName, enum) |
| 83 | } |
| 84 | return p.Text(varName) |
| 85 | } |
| 86 | |
| 87 | // textModel is the Bubble Tea model for text input |
| 88 | type textModel struct { |