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

proposal: Documentation for Go package types and functions should have 'since GOVERSION' at the end #23355

Closed
muja opened this issue Jan 6, 2018 · 2 comments

Comments

@muja
Copy link

muja commented Jan 6, 2018

When browsing Go packages, it is impossible to know since when a type or a function is part of the language. In fact, off the top of my head, I don't know any feasible way to get this information, apart from:

  • git blameing the specified source (which won't work if there were styling adjustments / documentation updates)
  • using that function/type and running a build across all Go versions and check when the build starts failing.
  • browsing all Go release patch notes looking for the function/type in question.

All of these steps are very cumbersome.

A way to identify the version since when a package feature is available would be very handy, especially for projects that try to support multiple Go versions. In general, it would be very informative to browse a package and see when a feature was introduced, and enable the reader to load up the release notes of that version and see if they can find some motivation behind the feature. It could also be the last straw to make the reader finally upgrade to the latest version.

For example, Java does this and it truly has its benefits.

While the PROs are very strong, the CON obviously is that it is a lot of work to update the docs to include this information.

@gopherbot gopherbot added this to the Proposal milestone Jan 6, 2018
@muja muja changed the title proposal: Documentation for Go packages should have 'since GOVERSION' at the end proposal: Documentation for Go package types and functions should have 'since GOVERSION' at the end Jan 6, 2018
@mvdan
Copy link
Member

mvdan commented Jan 6, 2018

For the standard library, this is a duplicate of #5778.

For third party packages, a proposal needs to include a decent way to obtain the information necessary. Depending on git or running multiple builds both seem like bad approaches.

@mvdan
Copy link
Member

mvdan commented Jan 6, 2018

Actually, since you say GOVERSION, I'm going to assume that you meant only the packages shipped with Go itself - the standard library. Closing.

@mvdan mvdan closed this as completed Jan 6, 2018
@golang golang locked and limited conversation to collaborators Jan 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants