]> Cypherpunks repositories - gostls13.git/commit
io: adopt Discard, NopCloser, ReadAll from io/ioutil
authorRuss Cox <rsc@golang.org>
Fri, 16 Oct 2020 04:41:03 +0000 (00:41 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 20 Oct 2020 18:41:16 +0000 (18:41 +0000)
commitcb0a0f52e67f128c6ad69027c9a8c7a5caf58446
tree14d607e5fd1c9705a779e9fe8de8388d527f9dac
parent7211694a1e3f9eaebff7074944feead968e00e72
io: adopt Discard, NopCloser, ReadAll from io/ioutil

As proposed and approved in #40025, Discard, NopCloser, and ReadAll
do not really fit into io/ioutil, which exists mainly to hold things that
would cause an import cycle if implemented in io itself, which is to say
things that import "os".

These three do not import "os" - they are generic io helpers like
many of the things in io itself, so it makes sense for them to be there.

Fixes #40025.

Change-Id: I77f47e9b2a72839edf7446997936631980047b67
Reviewed-on: https://go-review.googlesource.com/c/go/+/263141
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/io/example_test.go
src/io/io.go
src/io/ioutil/ioutil.go