Update go dependencies
This commit is contained in:
parent
d5cf22c129
commit
063cc68d1c
1321 changed files with 52830 additions and 31081 deletions
23
vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
generated
vendored
23
vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
generated
vendored
|
|
@ -880,6 +880,29 @@ func StrategicMergeMapPatchUsingLookupPatchMeta(original, patch JSONMap, schema
|
|||
return mergeMap(original, patch, schema, mergeOptions)
|
||||
}
|
||||
|
||||
// MergeStrategicMergeMapPatchUsingLookupPatchMeta merges strategic merge
|
||||
// patches retaining `null` fields and parallel lists. If 2 patches change the
|
||||
// same fields and the latter one will override the former one. If you don't
|
||||
// want that happen, you need to run func MergingMapsHaveConflicts before
|
||||
// merging these patches. Applying the resulting merged merge patch to a JSONMap
|
||||
// yields the same as merging each strategic merge patch to the JSONMap in
|
||||
// succession.
|
||||
func MergeStrategicMergeMapPatchUsingLookupPatchMeta(schema LookupPatchMeta, patches ...JSONMap) (JSONMap, error) {
|
||||
mergeOptions := MergeOptions{
|
||||
MergeParallelList: false,
|
||||
IgnoreUnmatchedNulls: false,
|
||||
}
|
||||
merged := JSONMap{}
|
||||
var err error
|
||||
for _, patch := range patches {
|
||||
merged, err = mergeMap(merged, patch, schema, mergeOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return merged, nil
|
||||
}
|
||||
|
||||
// handleDirectiveInMergeMap handles the patch directive when merging 2 maps.
|
||||
func handleDirectiveInMergeMap(directive interface{}, patch map[string]interface{}) (map[string]interface{}, error) {
|
||||
if directive == replaceDirective {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue