nokia / restful

A powerful RESTful framework for Go.
BSD 3-Clause "New" or "Revised" License
17 stars 14 forks source link

Go 1.22 http server instead of gorilla/mux #62

Open Som-Som-CC opened 8 months ago

Som-Som-CC commented 8 months ago

Go 1.22 has a new feature rich http router that can do quite many things that Gorilla/Mux used to be used for. Most importantly, HTTP method name and path variables. See https://tip.golang.org/doc/go1.22#enhanced_routing_patterns and https://pkg.go.dev/net/http#hdr-Patterns.

Even though it does not have sub-router feature and direct middleware (restful Monitor) support, it seems to be good enough for almost everything. Restful's Lambda is a handler function implicit wrapper and not really affected. The router / Restful's Server, however, is affected. Backward compatibility might be achievable. But a breaking v2 is probably cleaner and leaner.