-
Notifications
You must be signed in to change notification settings - Fork 18k
go.dev: prefers linux/amd64 over another pair even when it results in zero exported identifiers and no package comment, while another GOOS/GOARCH pair has non-zero identifiers #37665
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
Comments
Being able to explicitly choose a different value of GOOS or GOARCH is issue #37232, you can leave a 👍 reaction there. Almost all .go files in that package have a So there is a package for Windows, and it is empty. That is the documentation being shown. If that file is removed, then there wouldn't be a package available for GOOS=linux, and pkg.go.dev would default to displaying documentation in GOOS=windows mode. There are a few things that pkg.go.dev could consider doing differently:
/cc @julieqiu |
At the moment, if GOOS != linux, we will display For example, for https://pkg.go.dev/syscall/js?tab=doc: We can update this to display for all documentation, if that would be helpful. We are planning to eventually support #37232. |
I think it would be. I don't see much value in hiding it some of the time. Displaying it always is more predictable, and makes it possible to easily confirm what GOOS/GOARCH pair one is viewing at the moment. People who are not familiar with implementation details can't know for sure that no message means linux/amd64. (Design-wise, there may be opportunities to present that information in a better location, but the point that it should always be accessible and consistent still applies.) |
So adding the display will certainly solve the confusion issue, but will just leave the user understanding why they aren't seeing the information they want. Will there be a way to get the docs for a specific OS and/or architecture? |
@frazeradam would #37232 address the issue of having docs for a specific OS? |
I think it is exactly what would be needed @julieqiu. It solves the issue of not being able to see non-Linux documentation. While certainly beyond the minimal viable product, having the |
Great - I just merged a fix to update the Updates for the feature to support docs for a specific OS and/or architecture will be posted on #37232. Closing this issue. |
Fixes github.com/golang/go/issues/37665 Change-Id: I8af55b80d08aec64e134d52d99d00eb624dbf1bd Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/683363 CI-Result: Cloud Build <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
What is the URL of the page with the issue?
https://pkg.go.dev/github.com/lxn/walk/declarative?tab=doc
What is your user agent?
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36
Screenshot
What did you do?
Tried to read documentation for a Windows specific package.
What did you expect to see?
The documentation, or at least some way to set GOOS=windows. Since the package is Windows only, there is nothing for Linux.
What did you see instead?
Claims that the package has no documentation
The text was updated successfully, but these errors were encountered: