forked from TrueCloudLab/certificates
Remove http.CloseNotifier wrapper.
It's deprecated.
This commit is contained in:
parent
fe7973c060
commit
3d46bc13f5
1 changed files with 0 additions and 13 deletions
|
@ -2,7 +2,6 @@ package logging
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
)
|
||||
|
@ -31,9 +30,6 @@ func NewResponseLogger(w http.ResponseWriter) ResponseLogger {
|
|||
|
||||
func wrapLogger(w http.ResponseWriter) (rw ResponseLogger) {
|
||||
rw = &rwDefault{w, 200, 0, nil}
|
||||
if c, ok := w.(context.Context); ok {
|
||||
rw = &rwCloseNotifier{rw, c}
|
||||
}
|
||||
if f, ok := w.(http.Flusher); ok {
|
||||
rw = &rwFlusher{rw, f}
|
||||
}
|
||||
|
@ -89,15 +85,6 @@ func (r *rwDefault) WithFields(fields map[string]interface{}) {
|
|||
}
|
||||
}
|
||||
|
||||
type rwCloseNotifier struct {
|
||||
ResponseLogger
|
||||
ctx context.Context
|
||||
}
|
||||
|
||||
func (r *rwCloseNotifier) Done() <-chan struct{} {
|
||||
return r.Done()
|
||||
}
|
||||
|
||||
type rwFlusher struct {
|
||||
ResponseLogger
|
||||
f http.Flusher
|
||||
|
|
Loading…
Reference in a new issue