]> Cypherpunks repositories - gostls13.git/commit
io: unexport internal methods
authorRoger Peppe <rogpeppe@gmail.com>
Wed, 11 Aug 2021 11:14:41 +0000 (12:14 +0100)
committerroger peppe <rogpeppe@gmail.com>
Thu, 19 Aug 2021 09:11:02 +0000 (09:11 +0000)
commit3bdc1799d6ce441d7a972faf1452e34b6dce0826
tree0505cf5c239eb599b27708c4a23fe5d72efd9e1d
parent740f7d73707fab5000791b71c2ab046e3e5544c7
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>
src/io/pipe.go