init initializes the ref and invert maps lazily if they are nil.
()
| 503 | |
| 504 | // init initializes the ref and invert maps lazily if they are nil. |
| 505 | func (r *refObjectMapper) init() { |
| 506 | r.once.Do(func() { |
| 507 | r.ref = make(map[string]string) |
| 508 | r.invert = make(map[string][]string) |
| 509 | }) |
| 510 | } |
| 511 | |
| 512 | // setRef sets or updates the mapping between a referent object and a referenced object. |
| 513 | func (r *refObjectMapper) setRef(referent client.Object, referencedKey types.NamespacedName) { |