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

Method ConfigPostLoadCleanup

pkg/ddevapp/config.go:444–454  ·  view source on GitHub ↗

ConfigPostLoadCleanup performs cleanup of configuration after loading/merging. This ensures parity with the removed mergeAdditionalConfigIntoApp function.

()

Source from the content-addressed store, hash-verified

442// ConfigPostLoadCleanup performs cleanup of configuration after loading/merging.
443// This ensures parity with the removed mergeAdditionalConfigIntoApp function.
444func (app *DdevApp) ConfigPostLoadCleanup() {
445 // Make sure we don't have absolutely identical items in our resultant arrays
446 for _, arr := range []*[]string{&app.WebImageExtraPackages, &app.DBImageExtraPackages, &app.AdditionalHostnames, &app.AdditionalFQDNs, &app.OmitContainers} {
447 if arr != nil && *arr != nil {
448 *arr = util.SliceToUniqueSlice(arr)
449 }
450 }
451
452 // WebEnvironment needs special handling via EnvToUniqueEnv
453 app.WebEnvironment = util.EnvToUniqueEnv(&app.WebEnvironment)
454}
455
456// WarnIfConfigReplace messages user about whether config is being replaced or created
457func (app *DdevApp) WarnIfConfigReplace() {

Callers 2

ReadConfigMethod · 0.95
LoadConfigYamlFileMethod · 0.95

Calls 2

SliceToUniqueSliceFunction · 0.92
EnvToUniqueEnvFunction · 0.92

Tested by

no test coverage detected