PromptForConfig goes through a set of prompts to receive user input and generate an Config struct.
()
| 465 | |
| 466 | // PromptForConfig goes through a set of prompts to receive user input and generate an Config struct. |
| 467 | func (app *DdevApp) PromptForConfig() error { |
| 468 | app.WarnIfConfigReplace() |
| 469 | var err error |
| 470 | if err = app.projectNamePrompt(); err != nil { |
| 471 | return err |
| 472 | } |
| 473 | if err = app.docrootPrompt(); err != nil { |
| 474 | return err |
| 475 | } |
| 476 | if err = app.AppTypePrompt(); err != nil { |
| 477 | return err |
| 478 | } |
| 479 | if err = app.ConfigFileOverrideAction(false); err != nil { |
| 480 | return err |
| 481 | } |
| 482 | if err = app.ValidateConfig(); err != nil { |
| 483 | return err |
| 484 | } |
| 485 | return nil |
| 486 | } |
| 487 | |
| 488 | // ValidateProjectName checks to see if the project name works for a proper hostname |
| 489 | func ValidateProjectName(name string) error { |