TeeReadCloser returns a Reader that writes to w what it reads from r, just like io.TeeReader, and also implements Close
(r io.ReadCloser, w io.Writer)
| 87 | // TeeReadCloser returns a Reader that writes to w what it reads from r, |
| 88 | // just like io.TeeReader, and also implements Close |
| 89 | func TeeReadCloser(r io.ReadCloser, w io.Writer) io.ReadCloser { |
| 90 | return &teeReadCloser{r, w} |
| 91 | } |
| 92 | |
| 93 | type teeReadCloser struct { |
| 94 | r io.ReadCloser |