Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for r.PathValue when built for Go 1.22. #6

Merged
merged 1 commit into from
Oct 5, 2024

Conversation

paddycarver
Copy link
Contributor

Go 1.22 introduced pattern matching into its ServeMux, and as a result the net/http.Request type got a PathValue method, returning the value that matched the given key in the pattern.

We can, and should, populate the data behind that mathod when using trout's pattern matching, so handlers can standardize on that built-in function.

Go 1.22 introduced pattern matching into its ServeMux, and as a result
the net/http.Request type got a PathValue method, returning the value
that matched the given key in the pattern.

We can, and should, populate the data behind that mathod when using
trout's pattern matching, so handlers can standardize on that built-in
function.
@paddycarver paddycarver merged commit 80a59d6 into main Oct 5, 2024
2 checks passed
@paddycarver paddycarver deleted the go-1.22-path-value branch October 5, 2024 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant