Sends message as text/plain response with 200 status code.
(w http.ResponseWriter, message string)
| 79 | |
| 80 | // Sends message as text/plain response with 200 status code. |
| 81 | func WriteTextResponse(w http.ResponseWriter, message string) { |
| 82 | w.Header().Set("Content-Type", "text/plain") |
| 83 | |
| 84 | // Ignore inactionable errors. |
| 85 | _, _ = w.Write([]byte(message)) |
| 86 | } |
| 87 | |
| 88 | // Sends message as text/html response with 200 status code. |
| 89 | func WriteHTMLResponse(w http.ResponseWriter, message string) { |
no test coverage detected