Make testResponseWriter's CloseNotify return an actual channel instead of nil

This channel never gets written to, but this only means that the mock
ResponseWriter will never signal a premature disconnect.

Based on feedback from #763.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2015-08-03 15:10:14 -07:00
parent 12db5fc16b
commit cca86be6bf

View file

@ -114,7 +114,7 @@ func (trw *testResponseWriter) Header() http.Header {
// http.CloseNotifier interface, which WithResponseWriter expects to be // http.CloseNotifier interface, which WithResponseWriter expects to be
// implemented. // implemented.
func (trw *testResponseWriter) CloseNotify() <-chan bool { func (trw *testResponseWriter) CloseNotify() <-chan bool {
return nil return make(chan bool)
} }
func (trw *testResponseWriter) Write(p []byte) (n int, err error) { func (trw *testResponseWriter) Write(p []byte) (n int, err error) {