MCPcopy Create free account
hub / github.com/foxcpp/maddy / RunHooks

Function RunHooks

framework/hooks/hooks.go:67–72  ·  view source on GitHub ↗

RunHooks runs the hooks installed for the specified eventName in the reverse order.

(eventName Event)

Source from the content-addressed store, hash-verified

65// RunHooks runs the hooks installed for the specified eventName in the reverse
66// order.
67func RunHooks(eventName Event) {
68 hooks := hooksToRun(eventName)
69 for i := len(hooks) - 1; i >= 0; i-- {
70 hooks[i]()
71 }
72}
73
74// AddHook installs the hook to be executed when certain event occurs.
75func AddHook(eventName Event, f func()) {

Callers 3

RunFunction · 0.92
moduleMainFunction · 0.92
handleSignalsFunction · 0.92

Calls 1

hooksToRunFunction · 0.85

Tested by

no test coverage detected