I'm building a web service in Go. I use Negroni, unrolled/Render and Gorilla Mux.
I'm trying to write some simple middleware myself for caching http responses and being completly new to Golang a few questions came up...
Is there a way in which I can read what a handler's render.JSON(...) was when my midlleware is executed from the return of the handler.
Demo code below...
func MyMiddleWareHandler(w http.ResponseWriter, r *http.Request,next http.HandlerFunc) {
// First call the next/final handler
next(w, r)
//Now read the Render.JSON(...) executed by the handler called by next method above...
}