Reuse the adaptation done by the Handler method
diff --git a/router.go b/router.go index 8c9550f..8fa9520 100644 --- a/router.go +++ b/router.go
@@ -237,11 +237,7 @@ // HandlerFunc is an adapter which allows the usage of an http.HandlerFunc as a // request handle. func (r *Router) HandlerFunc(method, path string, handler http.HandlerFunc) { - r.Handle(method, path, - func(w http.ResponseWriter, req *http.Request, _ Params) { - handler(w, req) - }, - ) + r.Handler(method, path, handler) } // ServeFiles serves files from the given file system root.