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:
parent
12db5fc16b
commit
cca86be6bf
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue