ConfigPostLoadCleanup performs cleanup of configuration after loading/merging. This ensures parity with the removed mergeAdditionalConfigIntoApp function.
()
| 442 | // ConfigPostLoadCleanup performs cleanup of configuration after loading/merging. |
| 443 | // This ensures parity with the removed mergeAdditionalConfigIntoApp function. |
| 444 | func (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 |
| 457 | func (app *DdevApp) WarnIfConfigReplace() { |
no test coverage detected