RHEL requires the source code for dependencies to be included in the srpm. The spec file already expects that, but we've only included the vendored modules (i.e., the `vendor` directory) in the `rhel-8.2.` branch. Move vendoring to master, so that we can build RHEL packages from it as well. This commit is the result of running `go mod vendor`, which includes the vendored sources and updates go.mod and go.sum files. Fedora requires the opposite: dependencies should not be vendored. The spec file already ignores the `vendor` directory by default.
16 lines
428 B
Go
16 lines
428 B
Go
// +build !go1.7
|
|
|
|
package httprouter
|
|
|
|
import "net/http"
|
|
|
|
// Handler is an adapter which allows the usage of an http.Handler as a
|
|
// request handle. With go 1.7+, the Params will be available in the
|
|
// request context under ParamsKey.
|
|
func (r *Router) Handler(method, path string, handler http.Handler) {
|
|
r.Handle(method, path,
|
|
func(w http.ResponseWriter, req *http.Request, _ Params) {
|
|
handler.ServeHTTP(w, req)
|
|
},
|
|
)
|
|
}
|