MergeFromWithOptions creates a Patch that patches using the merge-patch strategy with the given object as base. See MergeFrom for more details.
(obj Object, opts ...MergeFromOption)
| 156 | // MergeFromWithOptions creates a Patch that patches using the merge-patch strategy with the given object as base. |
| 157 | // See MergeFrom for more details. |
| 158 | func MergeFromWithOptions(obj Object, opts ...MergeFromOption) Patch { |
| 159 | options := &MergeFromOptions{} |
| 160 | for _, opt := range opts { |
| 161 | opt.ApplyToMergeFrom(options) |
| 162 | } |
| 163 | return &mergeFromPatch{patchType: types.MergePatchType, createPatch: createMergePatch, from: obj, opts: *options} |
| 164 | } |
| 165 | |
| 166 | // StrategicMergeFrom creates a Patch that patches using the strategic-merge-patch strategy with the given object as base. |
| 167 | // The difference between MergeFrom and StrategicMergeFrom lays in the handling of modified list fields. |
searching dependent graphs…