(c echo.Context)
| 266 | } |
| 267 | |
| 268 | func correlationIDFromContext(c echo.Context) string { |
| 269 | if v, ok := c.Get(ContextKeyCorrelationID).(string); ok { |
| 270 | return v |
| 271 | } |
| 272 | // X-Correlation-ID header is set by trace.go middleware; read it as a |
| 273 | // fallback if the echo-context binding hasn't been populated yet. |
| 274 | return c.Response().Header().Get("X-Correlation-ID") |
| 275 | } |
| 276 | |
| 277 | // lastSSEData returns the payload of the last "data: " line whose content is not "[DONE]". |
| 278 | func lastSSEData(b []byte) ([]byte, bool) { |
no test coverage detected