From cca86be6bf22a84e21dea925f151452d8c80efc3 Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Mon, 3 Aug 2015 15:10:14 -0700 Subject: [PATCH] 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 --- context/http_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/http_test.go b/context/http_test.go index bbcd5fe24..ae88a314e 100644 --- a/context/http_test.go +++ b/context/http_test.go @@ -114,7 +114,7 @@ func (trw *testResponseWriter) Header() http.Header { // http.CloseNotifier interface, which WithResponseWriter expects to be // implemented. func (trw *testResponseWriter) CloseNotify() <-chan bool { - return nil + return make(chan bool) } func (trw *testResponseWriter) Write(p []byte) (n int, err error) {