MCPcopy Create free account
hub / github.com/devspace-sh/devspace / ApplyPatches

Function ApplyPatches

pkg/devspace/config/loader/profile.go:215–221  ·  view source on GitHub ↗

ApplyPatches applies the patches to the config if defined

(data map[string]interface{}, profile *latest.ProfileConfig)

Source from the content-addressed store, hash-verified

213
214// ApplyPatches applies the patches to the config if defined
215func ApplyPatches(data map[string]interface{}, profile *latest.ProfileConfig) (map[string]interface{}, error) {
216 if profile == nil || len(profile.Patches) == 0 {
217 return data, nil
218 }
219
220 return ApplyPatchesOnObject(data, profile.Patches)
221}
222
223func ApplyPatchesOnObject(data map[string]interface{}, configPatches []*latest.PatchConfig) (map[string]interface{}, error) {
224 out, err := yaml.Marshal(data)

Callers 2

applyProfilesMethod · 0.85
TestPatchesFunction · 0.85

Calls 1

ApplyPatchesOnObjectFunction · 0.85

Tested by 1

TestPatchesFunction · 0.68