blob: f25a5aea561554cfefc49af5aa93def915914cf3 (
plain) (
tree)
|
|
package service
import (
"io"
"net/http"
)
func newWriteFlusher(w http.ResponseWriter) io.Writer {
return writeFlusher{w.(interface {
io.Writer
http.Flusher
})}
}
type writeFlusher struct {
wf interface {
io.Writer
http.Flusher
}
}
func (w writeFlusher) Write(p []byte) (int, error) {
defer w.wf.Flush()
return w.wf.Write(p)
}
|