Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: show the stdlib/module version when a symbol was added #42933

cespare opened this issue Dec 2, 2020 · 1 comment

x/pkgsite: show the stdlib/module version when a symbol was added #42933

cespare opened this issue Dec 2, 2020 · 1 comment


Copy link

@cespare cespare commented Dec 2, 2020

It would be helpful if could show the version where a symbol was added.

This is something that is shown for the stdlib by the godoc HTTP server but not a feature that gddo has.

For instance, consider


The equivalent page is


To begin with, perhaps this could be shown only for the stdlib (to reach feature parity with godoc). It seems that godoc displays the first Go version where a symbol (type, function, method) existed if it was added after 1.0.

As a further improvement, it would be great to show this information for third-party modules as well. Here's one possible heuristic:

  • If the symbol existed in the earliest version of that module (i.e., the first release with the same major version), don't show anything.
  • Otherwise, show the first version where the symbol exists.

So if a module had releases

  • 1.0.0 with symbols {A}
  • 2.0.0 with symbols {A, B}
  • 2.1.0 with symbols {A, B, C}
  • 2.1.1 with symbols {A, B, C}

then the 1.0.0 and 2.0.0 doc pages wouldn't show any versions, whereas the 2.1.0 and 2.1.1 pages would show that C was added in 2.1.0.

Apologies if this feature request already exists somewhere. I tried a few github searches and couldn't turn up anything.

@gopherbot gopherbot added the pkgsite label Dec 2, 2020
@gopherbot gopherbot added this to the Unreleased milestone Dec 2, 2020
@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/dochtml Dec 2, 2020
@julieqiu julieqiu self-assigned this Dec 2, 2020
Copy link

@julieqiu julieqiu commented Dec 2, 2020

Thanks for the suggestion, @cespare! I appreciate the added context. This seems like a duplicate of #37102, so closing as a duplicate of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants