WriteString implements io.StringWriter. The data in str is written to rw.Body, if not nil.
(str string)
| 121 | // WriteString implements io.StringWriter. The data in str is written |
| 122 | // to rw.Body, if not nil. |
| 123 | func (rw *ResponseRecorder) WriteString(str string) (int, error) { |
| 124 | rw.writeHeader(nil, str) |
| 125 | if rw.Body != nil { |
| 126 | rw.Body.WriteString(str) |
| 127 | } |
| 128 | return len(str), nil |
| 129 | } |
| 130 | |
| 131 | func checkWriteHeaderCode(code int) { |
| 132 | // Issue 22880: require valid WriteHeader status codes. |
no test coverage detected