Last returns the last handler in the chain. ie. the last handler is the main one.
()
| 37 | |
| 38 | // Last returns the last handler in the chain. ie. the last handler is the main one. |
| 39 | func (c HandlersChain) Last() HandlerFunc { |
| 40 | if length := len(c); length > 0 { |
| 41 | return c[length-1] |
| 42 | } |
| 43 | return nil |
| 44 | } |