NewHandler creates a new [Handler] instance.
(out io.Writer, config *Config)
| 65 | |
| 66 | // NewHandler creates a new [Handler] instance. |
| 67 | func NewHandler(out io.Writer, config *Config) *Handler { |
| 68 | return &Handler{ |
| 69 | out: out, |
| 70 | config: config, |
| 71 | mu: new(sync.Mutex), |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // AddHook adds a new hook to the handler. |
| 76 | func (h *Handler) AddHook(hook Hook) { |
no outgoing calls