Wrap registers a Wrapper. Multiple calls accumulate; the host composes them in registration order (outermost first).
(hookName string, sel Selector, wrap Wrapper)
| 99 | // Wrap registers a Wrapper. Multiple calls accumulate; the host |
| 100 | // composes them in registration order (outermost first). |
| 101 | func (b *Builder) Wrap(hookName string, sel Selector, wrap Wrapper) *Builder { |
| 102 | if !b.validateHookName(hookName, "wrap") { |
| 103 | return b |
| 104 | } |
| 105 | n, s, w := hookName, sel, wrap |
| 106 | b.actions = append(b.actions, func(r Registrar) { |
| 107 | r.Wrap(n, s, w) |
| 108 | }) |
| 109 | return b |
| 110 | } |
| 111 | |
| 112 | // On registers a LifecycleHandler. |
| 113 | func (b *Builder) On(event LifecycleEvent, hookName string, fn LifecycleHandler) *Builder { |
nothing calls this directly
no test coverage detected