Handler -------------------------------------------------------------------- Handler sets a handler for the route.
(handler http.Handler)
| 126 | |
| 127 | // Handler sets a handler for the route. |
| 128 | func (r *Route) Handler(handler http.Handler) *Route { |
| 129 | if r.err == nil { |
| 130 | r.handler = handler |
| 131 | } |
| 132 | return r |
| 133 | } |
| 134 | |
| 135 | // HandlerFunc sets a handler function for the route. |
| 136 | func (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route { |
no outgoing calls