From 23ab331979fd3eb6d190c19606ef4b93faabbb0a Mon Sep 17 00:00:00 2001 From: Justen Martin Date: Wed, 18 Sep 2019 16:14:30 -0500 Subject: [PATCH] Removed deprecated CloseNotifier logic Signed-off-by: Justen Martin --- hack/validate/golangci-lint.yml | 4 ---- pkg/authorization/response.go | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/hack/validate/golangci-lint.yml b/hack/validate/golangci-lint.yml index 938c53f78d..815ba8c896 100644 --- a/hack/validate/golangci-lint.yml +++ b/hack/validate/golangci-lint.yml @@ -62,10 +62,6 @@ issues: - text: "SA1019: hdr.Xattrs is deprecated: Use PAXRecords instead" linters: - staticcheck - # FIXME temporarily suppress these. See #39929 - - text: "SA1019: http.CloseNotifier is deprecated" - linters: - - staticcheck # FIXME temporarily suppress these. See #39926 - text: "SA1019: httputil.NewClientConn is deprecated" linters: diff --git a/pkg/authorization/response.go b/pkg/authorization/response.go index 6b674bc295..82beb5be80 100644 --- a/pkg/authorization/response.go +++ b/pkg/authorization/response.go @@ -15,7 +15,6 @@ import ( type ResponseModifier interface { http.ResponseWriter http.Flusher - http.CloseNotifier // RawBody returns the current http content RawBody() []byte @@ -155,16 +154,6 @@ func (rm *responseModifier) Hijack() (net.Conn, *bufio.ReadWriter, error) { return hijacker.Hijack() } -// CloseNotify uses the internal close notify API of the wrapped http.ResponseWriter -func (rm *responseModifier) CloseNotify() <-chan bool { - closeNotifier, ok := rm.rw.(http.CloseNotifier) - if !ok { - logrus.Error("Internal response writer doesn't support the CloseNotifier interface") - return nil - } - return closeNotifier.CloseNotify() -} - // Flush uses the internal flush API of the wrapped http.ResponseWriter func (rm *responseModifier) Flush() { flusher, ok := rm.rw.(http.Flusher)