Closed pirfalt closed 5 years ago
PR merged. Closing issue. Thanks for the contribution @pirfalt and apologies for the delay!
To this point being made @pirfalt , you can just remove the gorillamux and handlerfunc packages. You simply cast them to an http.Handler when you instantiate your Handler package with Handler.New().
chi.Mux
,gin.Engine
,gorillamux.Router
,http.HandlerFunc
andnegroni.Negroni
all implements thehttp.Handler
interface, and all there adapter files are strikingly similar. All the adapters could probably be replaced with a single adapter which takes thathttp.Handler
interface instead of the concrete implementations.Which I noticed after opening #17 which adds this to
only the handlerfunc packagea new httpadapter package. (Which all others could delegate to).