Skip to content

x/pkgsite: APIs that are not present on linux-amd64 are difficult to discover #72923

@glycerine

Description

@glycerine

What is the URL of the page with the issue?

https://pkg.go.dev/golang.org/x/sys/unix

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36; I am on MacOS Sonoma 14.0 on amd64/intel hardware.

Screenshot

Image

()

Image

What did you do?

The ~/go/pkg/mod/golang.org/x/sys@v0.31.0/unix/fcntl_darwin.go has the following, Darwin specific, API:

// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.                                
func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
    _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
    return err
}

However, it was hidden from me, I did not discover it, because pkg.go.dev does not display it.

(Incognito mode or not in Chrome does not seem to matter; darwin specific call is missing either way).

What did you see happen?

The list of functions available in golang.org/x/sys@v0.31.0/unix does not include FcntlFstore.

What did you expect to see?

The list of functions available in golang.org/x/sys@v0.31.0/unix should include FcntlFstore, despite it being Darwin-only, in the fcntl_darwin.go file.

@julieqiu

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.pkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions