PreHandle registers an handler which is executed before a kite.Handler method is executed. Calling PreHandle multiple times registers multiple handlers. A non-error return triggers the execution of the next handler. The execution order is FIFO.
(handler Handler)
| 174 | // handlers. A non-error return triggers the execution of the next handler. The |
| 175 | // execution order is FIFO. |
| 176 | func (k *Kite) PreHandle(handler Handler) { |
| 177 | k.preHandlers = append(k.preHandlers, handler) |
| 178 | } |
| 179 | |
| 180 | // PreHandleFunc is the same as PreHandle. It accepts a HandlerFunc. |
| 181 | func (k *Kite) PreHandleFunc(handler HandlerFunc) { |