(w http.ResponseWriter)
| 233 | } |
| 234 | |
| 235 | func flush(w http.ResponseWriter) (err error) { |
| 236 | flusher, ok := w.(http.Flusher) |
| 237 | if !ok || flusher == nil { |
| 238 | return xerrors.New("SSE not supported") |
| 239 | } |
| 240 | |
| 241 | defer func() { |
| 242 | if r := recover(); r != nil { //nolint:revive,staticcheck // Intentionally swallowed; likely a broken connection. |
| 243 | } |
| 244 | }() |
| 245 | |
| 246 | flusher.Flush() |
| 247 | return nil |
| 248 | } |
no test coverage detected