(data []byte)
| 753 | } |
| 754 | |
| 755 | func newTCPRequestBody(data []byte) *requestBody { |
| 756 | pr, pw := io.Pipe() |
| 757 | go func() { |
| 758 | _, _ = pw.Write(data) |
| 759 | }() |
| 760 | return &requestBody{ |
| 761 | pr: pr, |
| 762 | pw: pw, |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | func (r *requestBody) Read(p []byte) (n int, err error) { |
| 767 | return r.pr.Read(p) |
no test coverage detected