initial commit

This commit is contained in:
2025-12-31 15:33:16 -05:00
commit 4641e7d0ef
51 changed files with 4779 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package api
import (
"net/http"
)
type flushWriter struct {
w http.ResponseWriter
f http.Flusher
}
func (fw *flushWriter) Write(p []byte) (n int, err error) {
// Write Data
n, err = fw.w.Write(p)
if err == nil && fw.f != nil {
fw.f.Flush()
}
return
}
func newFlushWriter(w http.ResponseWriter) *flushWriter {
flusher, _ := w.(http.Flusher)
return &flushWriter{
w: w,
f: flusher,
}
}