mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-18 15:13:32 -05:00
Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.2.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
22 lines
537 B
Go
22 lines
537 B
Go
//go:build go1.22 && !tinygo
|
|
// +build go1.22,!tinygo
|
|
|
|
|
|
package chi
|
|
|
|
import "net/http"
|
|
|
|
// supportsPathValue is true if the Go version is 1.22 and above.
|
|
//
|
|
// If this is true, `net/http.Request` has methods `SetPathValue` and `PathValue`.
|
|
const supportsPathValue = true
|
|
|
|
// setPathValue sets the path values in the Request value
|
|
// based on the provided request context.
|
|
func setPathValue(rctx *Context, r *http.Request) {
|
|
for i, key := range rctx.URLParams.Keys {
|
|
value := rctx.URLParams.Values[i]
|
|
r.SetPathValue(key, value)
|
|
}
|
|
}
|