MCPcopy Index your code
hub / github.com/gobwas/ws / writeErrorText

Function writeErrorText

http.go:409–416  ·  view source on GitHub ↗
(bw *bufio.Writer, err error)

Source from the content-addressed store, hash-verified

407}
408
409func 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.
419func httpError(w http.ResponseWriter, body string, code int) {

Callers 2

httpWriteResponseErrorFunction · 0.85
errorTextFunction · 0.85

Calls 2

WriteStringMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…