MCPcopy Index your code
hub / github.com/ddev/ddev / PromptForConfig

Method PromptForConfig

pkg/ddevapp/config.go:467–486  ·  view source on GitHub ↗

PromptForConfig goes through a set of prompts to receive user input and generate an Config struct.

()

Source from the content-addressed store, hash-verified

465
466// PromptForConfig goes through a set of prompts to receive user input and generate an Config struct.
467func (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
489func ValidateProjectName(name string) error {

Calls 6

WarnIfConfigReplaceMethod · 0.95
projectNamePromptMethod · 0.95
docrootPromptMethod · 0.95
AppTypePromptMethod · 0.95
ValidateConfigMethod · 0.95