Browse code

Removed deprecated CloseNotifier logic

Signed-off-by: Justen Martin <jmart@the-coder.com>

Justen Martin authored on 2019/09/19 06:14:30
Showing 2 changed files
... ...
@@ -62,10 +62,6 @@ issues:
62 62
     - text: "SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead"
63 63
       linters:
64 64
         - staticcheck
65
-    # FIXME temporarily suppress these. See #39929
66
-    - text: "SA1019: http.CloseNotifier is deprecated"
67
-      linters:
68
-        - staticcheck
69 65
     # FIXME temporarily suppress these. See #39926
70 66
     - text: "SA1019: httputil.NewClientConn is deprecated"
71 67
       linters:
... ...
@@ -15,7 +15,6 @@ import (
15 15
 type ResponseModifier interface {
16 16
 	http.ResponseWriter
17 17
 	http.Flusher
18
-	http.CloseNotifier
19 18
 
20 19
 	// RawBody returns the current http content
21 20
 	RawBody() []byte
... ...
@@ -155,16 +154,6 @@ func (rm *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) {
155 155
 	return hijacker.Hijack()
156 156
 }
157 157
 
158
-// CloseNotify uses the internal close notify API of the wrapped http.ResponseWriter
159
-func (rm *responseModifier) CloseNotify() <-chan bool {
160
-	closeNotifier, ok := rm.rw.(http.CloseNotifier)
161
-	if !ok {
162
-		logrus.Error("Internal response writer doesn't support the CloseNotifier interface")
163
-		return nil
164
-	}
165
-	return closeNotifier.CloseNotify()
166
-}
167
-
168 158
 // Flush uses the internal flush API of the wrapped http.ResponseWriter
169 159
 func (rm *responseModifier) Flush() {
170 160
 	flusher, ok := rm.rw.(http.Flusher)