golang/go

x/pkgsite: exported variables should appear in the index and be anchored

Open

#42,855 opened on Nov 27, 2020

View on GitHub
 (3 comments) (6 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsInvestigationhelp wantedpkgsitepkgsite/dochtml

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/frankban/quicktest@v1.11.2

What is your user agent?

Screenshot

See below

What did you do?

Related to https://github.com/golang/go/issues/42652

What did you expect to see?

I expected to be able to:

  • quickly and discover all variables exported by this package
  • quickly and easily find the IsNil exported variable (in this case I knew it existed), read its documentation, and be able to link to its anchor for reference

What did you see instead?

  • The variable not listed in the index
  • No anchored heading for the variable
  • The documentation buried in the documentation for the Checker type, with the IsNil documentation seemingly being a continuation of the IsFalse variable

Screen Shot 2020-11-27 at 10 24 56

To my mind there's a real discoverability problem here because IsNil and friends are exported precisely because they are intended to be used.

Contributor guide