HandlerFunc sets a handler function for the route.
(f func(http.ResponseWriter, *http.Request))
| 134 | |
| 135 | // HandlerFunc sets a handler function for the route. |
| 136 | func (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route { |
| 137 | return r.Handler(http.HandlerFunc(f)) |
| 138 | } |
| 139 | |
| 140 | // GetHandler returns the handler for the route, if any. |
| 141 | func (r *Route) GetHandler() http.Handler { |