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: x/pkgsite: support showing identifiers that are constrained by build tags #45833

codyoss opened this issue Apr 28, 2021 · 2 comments


Copy link

@codyoss codyoss commented Apr 28, 2021

What did you do?

What did you expect to see?

I expect some way to view docs for identifiers that are guarded by build constraints and the file to be listed is source files. Maybe something similar to how the official language docs can call out what version of Go an identifier was added in or a dropdown to select constraints? This could also be useful if a Windows version of a function has slightly different docs than the linux version.

What did you see instead?

I could not view the docs for my constrained function. Nor could I see constrained.go in the list of Source Files.

Additional context

This is sort of an off-shoot of some of the chatter in #34409. A suggestion was made to hide identifiers with build constraints. To me this would only be viable if developers could see those identifiers in documentation easily.

@gopherbot gopherbot added this to the Proposal milestone Apr 28, 2021
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals Apr 28, 2021
Copy link

@ianlancetaylor ianlancetaylor commented Apr 28, 2021

Copy link

@julieqiu julieqiu commented Apr 28, 2021

We do support a few common build tags for GOOS/GOARCH, but not arbitrary tags. This was discussed in #37232.

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

Successfully merging a pull request may close this issue.

None yet
4 participants