(title, description, placeholder string, value *string)
| 405 | } |
| 406 | |
| 407 | func promptInput(title, description, placeholder string, value *string) error { |
| 408 | input := huh.NewInput().Title(title).Value(value) |
| 409 | if description != "" { |
| 410 | input = input.Description(description) |
| 411 | } |
| 412 | if placeholder != "" { |
| 413 | input = input.Placeholder(placeholder) |
| 414 | } |
| 415 | if err := input.Run(); err != nil { |
| 416 | return fmt.Errorf("wizard cancelled: %w", err) |
| 417 | } |
| 418 | // Apply placeholder as default when user submits empty input |
| 419 | if *value == "" && placeholder != "" { |
| 420 | *value = placeholder |
| 421 | } |
| 422 | return nil |
| 423 | } |
| 424 | |
| 425 | func projectHint(source string) string { |
| 426 | switch source { |
no outgoing calls
no test coverage detected