Merge pull request #805 from elotl/vilmos-flushlogs

Use correct Flush() prototype from http.Flusher
This commit is contained in:
Brian Goff
2020-01-21 08:52:50 -08:00
committed by GitHub

View File

@@ -56,16 +56,14 @@ type flushWriter struct {
}
type writeFlusher interface {
Flush() error
Flush()
Write([]byte) (int, error)
}
func (fw *flushWriter) Write(p []byte) (int, error) {
n, err := fw.w.Write(p)
if n > 0 {
if err := fw.w.Flush(); err != nil {
return n, err
}
fw.w.Flush()
}
return n, err
}