News for hackers. Stuff that matters.
Re:Better HTTP server routing in Go 1.22 by oppositelock on Monday October 16, 2023 @10:20AM (#37900222)
It's a nice change for little experimental programs, but production servers need lots of functionality that third party routers offer, like request middleware, better error handling, etc. It's tedious to build these on top of the native router, so convenience will steer people to excellent packages like Gin, Echo, Fiber, Gorilla, Chi, etc.
Re:Better HTTP server routing in Go 1.22 by kunley on Monday October 16, 2023 @11:37AM (#37901346)
Honestly, there is a lot of praise of the middleware in these projects, but I recently found out that most of them are unable to handle parsing the Accept and Accept-Encoding header properly, that is: according to the RFC, with weights.

This means that the general perception "these projects are production-quality but stdlib isn't" is misleading. If I have to choose web framework or library that implements feature X incorrectly versus one that doesn't have X at all and I have to write it by myself, I will with no doubt choose the latter.

Re:Better HTTP server routing in Go 1.22 by BodyCulture on Monday October 16, 2023 @04:01PM (#37905637)
Please post issue numbers, thanks!
Re:Better HTTP server routing in Go 1.22 by kunley on Tuesday October 17, 2023 @03:53AM (#37911836)
Excuse me, what issue numbers?
Re:Better HTTP server routing in Go 1.22 by moomoo11 on Monday October 16, 2023 @01:17PM (#37903048)
Big fan of chi. It is simple, and just works. Also matches the http.Handler interface, so for testing and otherwise just makes life so easy (like using httptest new server - pass it the chi.Mux)