chore: Add flusher to make implement http.Flusher interface (#4255)

This commit is contained in:
Steven Masley
2022-09-29 01:16:11 +00:00
committed by GitHub
parent 6d2b7ea3ba
commit 028a4edbd4
+6
View File
@@ -127,3 +127,9 @@ type hijacker struct {
func (hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) {
return nil, nil, xerrors.New("hijacked")
}
func (h hijacker) Flush() {
if f, ok := h.ResponseWriter.(http.Flusher); ok {
f.Flush()
}
}