(bw *bufio.Writer, err error)
| 407 | } |
| 408 | |
| 409 | func writeErrorText(bw *bufio.Writer, err error) { |
| 410 | body := err.Error() |
| 411 | bw.WriteString("Content-Length: ") |
| 412 | bw.WriteString(strconv.Itoa(len(body))) |
| 413 | bw.WriteString(crlf) |
| 414 | bw.WriteString(crlf) |
| 415 | bw.WriteString(body) |
| 416 | } |
| 417 | |
| 418 | // httpError is like the http.Error with WebSocket context exception. |
| 419 | func httpError(w http.ResponseWriter, body string, code int) { |
no test coverage detected
searching dependent graphs…