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: "Rendered for" (GOOS) setting should carry across links #49424

Closed
mhagger opened this issue Nov 7, 2021 · 1 comment
Closed

x/pkgsite: "Rendered for" (GOOS) setting should carry across links #49424

mhagger opened this issue Nov 7, 2021 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@mhagger
Copy link

mhagger commented Nov 7, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/os?GOOS=windows (for example)

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Screenshot

N/A

What did you do?

  1. Go to https://pkg.go.dev/os using a Linux browser. Note that the page is "Rendered for Linux/amd64".
  2. On that page, select "Rendered for Windows/amd64". The page redirects to https://pkg.go.dev/os?GOOS=windows and shows the Windows versions of the docs. This is as expected.
  3. Click on various links in the rendered-for-Windows page. As far as I can tell, most links that go outside of the page do not preserve the GOOS=windows selection, thus bringing you to the rendered-for-Linux version of the page. This is especially unfortunate in links like the following, which really are OS-dependent:
    • In the "Constants" second, in the line for O_RDONLY, the links for syscall and O_RDONLY
    • In the "Type Signal" section, the links for syscall and SIGINT

What did you expect to see?

If I explicitly select the rendered-for-Windows version of a doc page, I expect links in that page to bring me to the rendered-for-Windows versions of the linked-to pages.

What did you see instead?

Many or all off-page links brought me back to rendered-for-Linux doc pages.

This is confusing, because if one doesn't notice the change of the "rendered for" setting, one might naturally assume that one is continuing to see documentation for the chosen environment.

@gopherbot gopherbot added this to the pkgsite/unplanned milestone Nov 7, 2021
@jamalc jamalc self-assigned this Dec 10, 2021
@jamalc jamalc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 10, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/377396 mentions this issue: internal: GOOS setting preserved across doc links

@rsc rsc unassigned jamalc Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

3 participants