(id ksuid.KSUID)
| 71 | } |
| 72 | |
| 73 | func (p *Patch) DeleteObject(id ksuid.KSUID) error { |
| 74 | if p.diff.Exists(id) { |
| 75 | return p.diff.DeleteObject(id) |
| 76 | } |
| 77 | if !Exists(p.base, id) { |
| 78 | return ErrNotFound |
| 79 | } |
| 80 | // Keep track of the deletions from the base so we can add the |
| 81 | // needed delete Actions when building the transaction patch. |
| 82 | p.deletedObjects = append(p.deletedObjects, id) |
| 83 | return nil |
| 84 | } |
| 85 | |
| 86 | func (p *Patch) AddVector(id ksuid.KSUID) error { |
| 87 | if p.HasVector(id) { |
no test coverage detected