Skip to content

strings: missing docstrings for Reader methods #40381

@dreness

Description

@dreness

What version of Go are you using (go version)?

❯ go version
go version go1.14 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

❯ go env | egrep 'GOARCH|GOOS'
GOARCH="amd64"
GOOS="darwin"

What did you do?

I read the strings.Reader documentation.

What did you expect to see?

I expect documentation for every function, either inline or behind a link to the appropriate base... class / interface / package (I don't know the lingo yet, that's kinda why I'm reading golang docs ;)

What did you see instead?

I see that various string.Reader functions are not documented, such as:

strings.Reader.Read
strings.Reader.ReadAt
strings.Reader.ReadByte
strings.Reader.ReadRune
strings.Reader.UnreadByte
strings.Reader.UnreadRune

... and after a bit more clicking around, my impression is that at least some of these capabilities are documented, but not in the most obvious place - for example, strings.Reader.ReadAt has a nice description under io.ReaderAt

It's not unreasonable to expect that a thorough and diligent learner could follow the path from strings.Reader.Read to strings.Reader, whose description mentions (but does not link to) io.Reader, and from there to io.ReaderAt. For the benefit of golang foreigners who air-drop in to do a quick job and then bail, please consider providing some kind of inline reference for all the relevant context for any given function or interface. Maybe that takes the form of outbound links to the relevant base reference, or maybe the documentation for the wrapped interface / function is presented inline in the docs of the wrapper (perhaps 'below the fold').

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions