feat: stream return.

This commit is contained in:
2026-05-02 18:08:23 +08:00
parent cdeca48a7d
commit ae5d70b951
2 changed files with 183 additions and 66 deletions
+7
View File
@@ -55,3 +55,10 @@ func (w *gzipResponseWriter) Write(data []byte) (int, error) {
func (w *gzipResponseWriter) WriteString(s string) (int, error) {
return w.gzWriter.Write([]byte(s))
}
func (w *gzipResponseWriter) Flush() {
w.gzWriter.Flush()
if flusher, ok := w.ResponseWriter.(http.Flusher); ok {
flusher.Flush()
}
}