(prefix, s []byte)
| 206 | } |
| 207 | |
| 208 | func prefixLines(prefix, s []byte) []byte { |
| 209 | ss := bytes.NewBuffer(make([]byte, 0, len(s)*2)) |
| 210 | for _, line := range bytes.Split(s, []byte("\n")) { |
| 211 | _, _ = ss.Write(prefix) |
| 212 | _, _ = ss.Write(line) |
| 213 | _ = ss.WriteByte('\n') |
| 214 | } |
| 215 | return ss.Bytes() |
| 216 | } |
| 217 | |
| 218 | // Request performs a HTTP request with the body provided. The caller is |
| 219 | // responsible for closing the response body. |
no test coverage detected