HandleFunc registers a new route with a matcher for the URL path. See Route.Path() and Route.HandlerFunc().
(path string, f func(http.ResponseWriter, *http.Request))
| 298 | // HandleFunc registers a new route with a matcher for the URL path. |
| 299 | // See Route.Path() and Route.HandlerFunc(). |
| 300 | func (r *Router) HandleFunc(path string, f func(http.ResponseWriter, |
| 301 | *http.Request)) *Route { |
| 302 | return r.NewRoute().Path(path).HandlerFunc(f) |
| 303 | } |
| 304 | |
| 305 | // Headers registers a new route with a matcher for request header values. |
| 306 | // See Route.Headers(). |