Open MrXu opened 8 years ago
Yes, on top of go-json-rest stack of middlewares must be an App
. Which does not have to be the default router. Anything satisfying the App
interface will do. It should be possible to take any third party router, and wrap it into an App
.
The App
interface is defined like this:
type App interface {
AppFunc() HandlerFunc
}
I'm trying to do the opposite. In order to use manyminds/api2go with go-json-rest, I'm trying to write a api2go adapter. I need to get a http.Handler from go-json-rest and I am quite lost.
Instead of using the default router, is it possible to use the httprouter with go-json-rest?