Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Active ¶
Active returns true if the hook is set, false otherwise. Using this first before using Exec may be more efficient due to the arguments provided to Exec.
func Add ¶
Add a function for the given hook. The function is added to the list of functions of the hook. Add returns an ID2 that represents the individual function of the hook.
func Exec ¶
func Exec(hook int, args ...interface{})
Exec executes all functions for the hook with the given args. It does nothing if there is no function for the hook. The functions for a hook are executed in LIFO order. While functions for a hook are executed, the hook itself is not called.
Types ¶
type HookContainer ¶ added in v0.0.2
type HookContainer struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.