]> Cypherpunks repositories - gostls13.git/commit
archive/tar: unexport internal methods
authorRoger Peppe <rogpeppe@gmail.com>
Wed, 11 Aug 2021 11:50:34 +0000 (12:50 +0100)
committerroger peppe <rogpeppe@gmail.com>
Thu, 19 Aug 2021 09:09:02 +0000 (09:09 +0000)
commit740f7d73707fab5000791b71c2ab046e3e5544c7
tree0dc846636e55968fddbc680c2a9e75ef2554b1fd
parentc85695a117f1ec3b800ba14570876cfcd2075c1f
archive/tar: unexport internal methods

Many of the methods inside the archive/tar package 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.

This CL should have no externally visible behaviour changes at all.

Change-Id: I94a63de5e6a28e9ac8a283325217349ebce4f308
Reviewed-on: https://go-review.googlesource.com/c/go/+/341410
Reviewed-by: Joe Tsai <joetsai@digital-static.net>
Trust: Joe Tsai <joetsai@digital-static.net>
Trust: Michael Knyszek <mknyszek@google.com>
src/archive/tar/common.go
src/archive/tar/format.go
src/archive/tar/reader.go
src/archive/tar/reader_test.go
src/archive/tar/writer.go
src/archive/tar/writer_test.go