Method
buildInputForm
(prompt, defaultValue string)
Source from the content-addressed store, hash-verified
| 122 | } |
| 123 | |
| 124 | func (p *huhPrompter) buildInputForm(prompt, defaultValue string) (*huh.Form, *string) { |
| 125 | result := defaultValue |
| 126 | form := p.newForm( |
| 127 | huh.NewGroup( |
| 128 | huh.NewInput(). |
| 129 | Title(prompt). |
| 130 | Value(&result), |
| 131 | ), |
| 132 | ) |
| 133 | return form, &result |
| 134 | } |
| 135 | |
| 136 | func (p *huhPrompter) Input(prompt, defaultValue string) (string, error) { |
| 137 | form, result := p.buildInputForm(prompt, defaultValue) |