Before registers a function which is called just before the response (status) is written.
(fn func())
| 34 | |
| 35 | // Before registers a function which is called just before the response (status) is written. |
| 36 | func (r *Response) Before(fn func()) { |
| 37 | r.beforeFuncs = append(r.beforeFuncs, fn) |
| 38 | } |
| 39 | |
| 40 | // After registers a function which is called just after the response is written. |
| 41 | func (r *Response) After(fn func()) { |
no outgoing calls