mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #39956 from jmartin84/fix-closenotifier-deprecation-warning
Removed deprecated CloseNotifier logic
This commit is contained in:
commit
1dd9260e47
2 changed files with 0 additions and 15 deletions
|
@ -58,10 +58,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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue