FinalFunc registers a function that is always called as a last one after pre-, handler and post- functions. It receives a result and an error from last handler that got executed prior to calling final func.
(f FinalFunc)
| 201 | // It receives a result and an error from last handler that |
| 202 | // got executed prior to calling final func. |
| 203 | func (k *Kite) FinalFunc(f FinalFunc) { |
| 204 | k.finalFuncs = append(k.finalFuncs, f) |
| 205 | } |
| 206 | |
| 207 | func (m *Method) ServeKite(r *Request) (interface{}, error) { |
| 208 | var firstResp interface{} |