-
Notifications
You must be signed in to change notification settings - Fork 224
Description
The first win is that this would solve this issue: #173
The second win, is that you can use Gorilla features directly such as StrictSlash, and SkipClean etc.
Thirdly, Server Muxes such as Gorilla have evolved pretty well to:
- Let you do a lot more than it used to: you can now have middleware on handlers, the entire mux, use sub routers, multiple sub routers, etc.
- Be a well known standard across companies and open source projects
This would clean up a lot of the simple server code as it will mainly do the uplifting of running a production server: graceful shutdowns, tracing, metrics, etc.
The way I propose we do this, if wanted, is that a user can register a handler instead of a Service, but eventually removing the Service interface in a major tag release.
That said, I do like the map[string]map[string]http.HandlerFunc data structure as it looks pretty concise and readable. However, issue 173 will not be solved until if/when generics implement an "ordered map".