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
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".
The text was updated successfully, but these errors were encountered:
The plus for embedding the router is that it takes another decision out of the way for developers. One way of maintaining that would be to go the RouterOption route like the kit server. https://godoc.org/github.com/NYTimes/gizmo/server/kit#RouterOption It'd just require use to make another Option or two for StrictSlash and the like.
That being said, I'm not against trying out some other method, but I would like to keep some kind of data structure like we do have now.
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
, andSkipClean
etc.Thirdly, Server Muxes such as Gorilla have evolved pretty well to:
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".The text was updated successfully, but these errors were encountered: