Open jolan opened 7 years ago
After much evaluation and application in projects, I have found that github.com/pressly/chi is one of the absolute best. It is designed with the go 1.7 context improvements at its core. It has a fantastic router with group support and obvious semantics for adding middleware, which by the way are completely compatible with http.Handler (not a wacky syntax with extra parameters or a single package-defined context object). It comes with large set of middleware in a separate package, a docgen package, and an experimental "renderer" package with API versioning in mind (although content negotiation and the Accept header is the "cool" but harder to use solution, it would seem).
FTIW, the runners up in my evaluation were: echo, gocraft-web, and for just a router, bone.
I'm excited to see how this goes for dcrstakepool!
Most Go web frameworks use https://godoc.org/golang.org/x/net/context/ or https://golang.org/pkg/context/ internally now. It would help the code base a lot to modernize the framework/middleware.