]> Cypherpunks repositories - gostls13.git/commit
io: NopCloser forward WriterTo implementations if the reader supports it
authorJorropo <jorropo.pgm@gmail.com>
Mon, 2 May 2022 11:50:36 +0000 (11:50 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 3 May 2022 14:37:48 +0000 (14:37 +0000)
commit0537a74b76fcab1398da6699c3ff7411fef8fbe7
tree063cd4278c88d0e9d2207fc0f2c5a2b67f809376
parentd0cda4d95f4c889fdb4988750f704604553c35a4
io: NopCloser forward WriterTo implementations if the reader supports it

This patch also include related fixes to net/http.

io_test.go don't test reading or WritingTo of the because the logic is simple.
NopCloser didn't even had direct tests before.

Fixes #51566

Change-Id: I1943ee2c20d0fe749f4d04177342ce6eca443efe
GitHub-Last-Rev: a6b9af4e945a6903735a74aa185e2d1c4c2e2cef
GitHub-Pull-Request: golang/go#52340
Reviewed-on: https://go-review.googlesource.com/c/go/+/400236
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/io/io.go
src/io/io_test.go
src/net/http/transfer.go