Remove ResponseWriter.Close method
This commit is contained in:
11
response.go
11
response.go
@@ -147,10 +147,6 @@ type ResponseWriter interface {
|
||||
|
||||
// Flush sends any buffered data to the client.
|
||||
Flush() error
|
||||
|
||||
// Close closes the connection.
|
||||
// Any blocked Write operations will be unblocked and return errors.
|
||||
Close() error
|
||||
}
|
||||
|
||||
type responseWriter struct {
|
||||
@@ -161,10 +157,9 @@ type responseWriter struct {
|
||||
bodyAllowed bool
|
||||
}
|
||||
|
||||
func newResponseWriter(w io.WriteCloser) *responseWriter {
|
||||
func newResponseWriter(w io.Writer) *responseWriter {
|
||||
return &responseWriter{
|
||||
bw: bufio.NewWriter(w),
|
||||
cl: w,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +205,3 @@ func (w *responseWriter) Flush() error {
|
||||
// Write errors from WriteHeader will be returned here.
|
||||
return w.bw.Flush()
|
||||
}
|
||||
|
||||
func (w *responseWriter) Close() error {
|
||||
return w.cl.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user