bytes: Reader.Size method documentation is inaccurate #54018
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Documentation issue; currently visible default version is 1.18.4
Does this issue reproduce with the latest release?
Yes, 1.18.4 is the latest release. This doesn't seem to have been fixed as of 1.19rc2 either.
What operating system and processor architecture are you using (
go env
)?N/A (platform-agnostic documentation issue)
What did you do?
Viewed the docs for
Reader.Size
method inbytes
standard library packageWhat did you expect to see?
The
Reader.Reset
method can change the underlying byte slice. The docs forSize
method should say something like (changes italicized):What did you see instead?
The docs currently say:
The
Reset
method is the only violation of this wording, and it was added in Go 1.7, but theSize
method dates back to 1.5. This minor documentation issue seems to have arisen because an assumption (immutability of the byte slice) changed between versions of the language/library.The text was updated successfully, but these errors were encountered: