| 44 | } |
| 45 | |
| 46 | func (o *ObjectPatcher) ExecuteOperations(ops []sdkpkg.PatchCollectorOperation) error { |
| 47 | log.Debug("Starting execute operations process") |
| 48 | defer log.Debug("Finished execute operations process") |
| 49 | |
| 50 | applyErrors := &multierror.Error{} |
| 51 | for _, op := range ops { |
| 52 | log.Debug("Applying operation", slog.String(pkg.LogKeyName, op.Description())) |
| 53 | if err := o.ExecuteOperation(op); err != nil { |
| 54 | err = gerror.WithMessage(err, op.Description()) |
| 55 | applyErrors = multierror.Append(applyErrors, err) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | return applyErrors.ErrorOrNil() |
| 60 | } |
| 61 | |
| 62 | func (o *ObjectPatcher) ExecuteOperation(operation sdkpkg.PatchCollectorOperation) error { |
| 63 | if operation == nil { |