remove flush in Copy, un-necessary

pull/1/head
Brad Rydzewski 5 years ago
parent e458a51996
commit f022d0b35d

@ -18,9 +18,6 @@ func Copy(dst io.Writer, src io.ReadCloser) error {
if _, err := dst.Write(bytes); err != nil {
return err
}
if flusher, ok := dst.(Flusher); ok {
flusher.Flush()
}
if err != nil {
if err != io.EOF {
return err
@ -29,10 +26,3 @@ func Copy(dst io.Writer, src io.ReadCloser) error {
}
}
}
// The Flusher interface is implemented by an io.Writer that
// flushes buffered data to the client.
type Flusher interface {
// Flush sends any buffered data to the client.
Flush() error
}

Loading…
Cancel
Save