Skip to content

Replace net/http Request.pat.str with Request.Pattern #2090

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

Merged
merged 7 commits into from
Apr 24, 2025

Conversation

txabman42
Copy link
Contributor

Request.pat.str was made public via Request.Pattern in go1.23

It's just a small change to not depend for internal properties if public ones could be used. A bit more simple and avoid being affected by some internal refactors.

@txabman42 txabman42 requested a review from a team as a code owner April 3, 2025 14:25
@txabman42 txabman42 force-pushed the xabier/replace-nethttp-pat branch from 0b57d3f to bd494c3 Compare April 3, 2025 14:30
Copy link
Contributor

@RonFed RonFed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @grcevski comments.
There is no reason to drop support for go1.22 - we can use the private field when the public one is not available.

@txabman42 txabman42 force-pushed the xabier/replace-nethttp-pat branch 2 times, most recently from 04c9f20 to d342f5f Compare April 6, 2025 17:08
@txabman42 txabman42 requested review from grcevski and RonFed April 6, 2025 17:13
Request.pat.str was made public via Request.Pattern in go1.23
(golang/go@a523152)
net/http ServerMux pattern is supported for go1.22 which relay in
Request.pat.str private fields.
@txabman42 txabman42 force-pushed the xabier/replace-nethttp-pat branch from 7e32d15 to fde72f4 Compare April 9, 2025 07:17
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for iterating on this!

@MrAlias MrAlias merged commit 30f2554 into open-telemetry:main Apr 24, 2025
38 checks passed
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.

4 participants