(bw *bufio.Writer, err error)
| 259 | } |
| 260 | |
| 261 | func writeErrorText(bw *bufio.Writer, err error) { |
| 262 | body := err.Error() |
| 263 | _, _ = bw.WriteString("Content-Length: ") |
| 264 | _, _ = bw.WriteString(strconv.Itoa(len(body))) |
| 265 | _, _ = bw.WriteString(crlf) |
| 266 | _, _ = bw.WriteString(crlf) |
| 267 | _, _ = bw.WriteString(body) |
| 268 | } |
| 269 | |
| 270 | // statusText is a non-performant status text generator. |
| 271 | // NOTE: Used only to generate constants. |
no test coverage detected