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

Function LoadProjectConfig

pkg/settings/settings_config.go:44–47  ·  view source on GitHub ↗

LoadProjectConfig loads a main project config and merges optional overrides into the target struct.

(mainPath string, overridePaths []string, target any)

Source from the content-addressed store, hash-verified

42
43// LoadProjectConfig loads a main project config and merges optional overrides into the target struct.
44func LoadProjectConfig(mainPath string, overridePaths []string, target any) error {
45 factory := getDefaultFactory()
46 return factory.LoadProjectConfig(mainPath, overridePaths, target)
47}
48
49// LoadProjectConfigFromContents loads a main project config and merges optional overrides from pre-read bytes.
50func LoadProjectConfigFromContents(mainContent []byte, overrides []OverrideConfig, target any) error {

Callers 4

LoadConfigYamlFileMethod · 0.92
TestLoadProjectConfigFunction · 0.85
TestReproUnmarshalingFunction · 0.85

Calls 2

getDefaultFactoryFunction · 0.85
LoadProjectConfigMethod · 0.65

Tested by 3

TestLoadProjectConfigFunction · 0.68
TestReproUnmarshalingFunction · 0.68