(w http.ResponseWriter)
| 260 | } |
| 261 | |
| 262 | func flush(w http.ResponseWriter) (err error) { |
| 263 | flusher, ok := w.(http.Flusher) |
| 264 | if !ok || flusher == nil { |
| 265 | return xerrors.New("SSE not supported") |
| 266 | } |
| 267 | |
| 268 | defer func() { |
| 269 | if r := recover(); r != nil { //nolint:revive,staticcheck // Intentionally swallowed; likely a broken connection. |
| 270 | } |
| 271 | }() |
| 272 | |
| 273 | flusher.Flush() |
| 274 | return nil |
| 275 | } |
no test coverage detected