You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey y'all!
For Go 1.22, this enhanced ServeMux routing proposal was accepted and pushed into the main tree, and *http.Request has some new methods, SetPathValue and PathValue. I think r.PathValue(...) could act as an alias for chi.URLParam(r, ...) when routing with chi.
There would probably need to be some logic with //go:build go1.22 that runs SetPathValue when inserting keys/values into chi.Context.URLParams for the corresponding http.Request. I have not dug deeper into chi's source code, but I think this would be a welcome addition for when Go 1.22 is released.
egtann, sonatard, fxrcode, pkieltyka, flibustenet and 1 more