1
0
mirror of https://github.com/golang/go synced 2024-11-23 03:50:03 -07:00
go/src/io
Roger Peppe 3bdc1799d6 io: unexport internal methods
The methods on the pipe type don't need to be exported. Doing so sets
a bad precedent that it's OK to export methods to indicate an internal
public API.  That's not a good idea in general, because exported methods
increase cognitive load when reading code: the reader needs to consider
whether the exported method might be used via some external interface
or reflection.

Change-Id: Ib13f1b3f9fe0ff251628f31b776182a0953268ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/341409
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Joe Tsai <joetsai@digital-static.net>
Trust: Daniel Martí <mvdan@mvdan.cc>
2021-08-19 09:11:02 +00:00
..
fs io/fs: don't use absolute path in DirEntry.Name doc 2021-08-02 17:18:57 +00:00
ioutil io/ioutil: use correct Go version in redirection comments 2021-03-19 01:02:56 +00:00
example_test.go io: add error check to WriteString Example test 2021-03-13 18:03:52 +00:00
export_test.go io: unexport ErrBadWriteCount 2020-10-16 17:52:59 +00:00
io_test.go io: unexport ErrBadWriteCount 2020-10-16 17:52:59 +00:00
io.go io: fix spelling in documentation for io.Discard 2021-03-23 22:17:52 +00:00
multi_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
multi.go
pipe_test.go io: add error check on pipe close functions to avoid error overwriting 2019-08-28 18:35:24 +00:00
pipe.go io: unexport internal methods 2021-08-19 09:11:02 +00:00