x/pkgsite: Use visitor's GOOS when viewing documentation. #45298
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite
Milestone
pkg.go.dev has the ability to show documentation for different
GOOS
by setting the variable in the URL or by using the dropdown. It does however not default to the host operating system like it did on godoc. This has lead to repeated confusion when people want to use a function, but find out it doesn't exist during compile time.An example of this is https://pkg.go.dev/github.com/creack/pty, which when viewed on a windows machine shows a function
Start
. When changing theGOOS
to windows it disappears.I would propose defaulting to the visitor's operating system when possible.
edit: clarified which host
The text was updated successfully, but these errors were encountered: