(namespace string, fn func(gc.Node), bref func(gc.Node, gc.Node))
| 420 | } |
| 421 | |
| 422 | func (c *gcContext) active(namespace string, fn func(gc.Node), bref func(gc.Node, gc.Node)) { |
| 423 | for _, gctx := range c.contexts { |
| 424 | if cc, ok := gctx.(collectionWithBackRefs); ok { |
| 425 | // If the context supports back references, use it |
| 426 | cc.ActiveWithBackRefs(namespace, fn, bref) |
| 427 | } else { |
| 428 | // Check if supports back references, if so, add |
| 429 | gctx.Active(namespace, fn) |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | func (c *gcContext) leased(namespace, lease string, fn func(gc.Node)) { |
| 435 | for _, gctx := range c.contexts { |
no test coverage detected