gin-gonic/gin — pull request #102 by eMxyzptlk (2014-08-24 06:21:24+00:00)
Title: Export ResponseWriter.Reset() so we can set it up from tests

I do unit test my controllers and I need to assign `httptest.NewRecorder()` as the Context.Writer. However we wrap the `http.ResponseWriter` with `gin.responseWriter` an unexported struct that we can create objects from.

This pull request export the `ResponseWriter` and the `Reset()` so we can use as such:

```
ctx := &gin.Context{
Request: appengineCtx.Request().(*http.Request),
}

rw := new(gin.ResponseWriter)
rw.Reset(httptest.NewRecorder())
ctx.Writer = rw

controller.Action(ctx)
```