Last returns the last handler in the chain. i.e. the last handler is the main one.
()
| 58 | |
| 59 | // Last returns the last handler in the chain. i.e. the last handler is the main one. |
| 60 | func (c HandlersChain) Last() HandlerFunc { |
| 61 | if length := len(c); length > 0 { |
| 62 | return c[length-1] |
| 63 | } |
| 64 | return nil |
| 65 | } |
| 66 | |
| 67 | // RouteInfo represents a request route's specification which contains method and path and its handler. |
| 68 | type RouteInfo struct { |