Skip to content

x/pkgsite: Use visitor's GOOS when viewing documentation. #45298

@svenwiltink

Description

@svenwiltink

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 the GOOS to windows it disappears.

I would propose defaulting to the visitor's operating system when possible.

edit: clarified which host

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.pkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions