(b []byte)
| 1304 | } |
| 1305 | |
| 1306 | func (sw *statusWriter) Write(b []byte) (int, error) { |
| 1307 | if sw.status >= 500 { |
| 1308 | sw.body.Write(b) //nolint:errcheck |
| 1309 | } |
| 1310 | return sw.ResponseWriter.Write(b) |
| 1311 | } |
| 1312 | |
| 1313 | // Flush 转发 http.Flusher,保证 SSE 等流式端点可以正常推送数据。 |
| 1314 | func (sw *statusWriter) Flush() { |
no outgoing calls