(requiredValue string)
| 267 | } |
| 268 | |
| 269 | func (p *accessiblePrompter) ConfirmDeletion(requiredValue string) error { |
| 270 | form := p.newForm( |
| 271 | huh.NewGroup( |
| 272 | huh.NewInput(). |
| 273 | Title(fmt.Sprintf("Type %q to confirm deletion", requiredValue)). |
| 274 | Validate(func(input string) error { |
| 275 | if input != requiredValue { |
| 276 | return fmt.Errorf("You entered: %q", input) |
| 277 | } |
| 278 | return nil |
| 279 | }), |
| 280 | ), |
| 281 | ) |
| 282 | |
| 283 | return form.Run() |
| 284 | } |
| 285 | |
| 286 | func (p *accessiblePrompter) InputHostname() (string, error) { |
| 287 | var result string |