Skip to content

proposal: go.mod: cgo dependency #73407

@pjebs

Description

@pjebs

Proposal Details

It would be beneficial if there was some way for a package to "advertise" that the package REQUIRES cgo.

Perhaps a pseudo require in the go.mod file.

And following from that, if CGO is not enabled when building and the go.mod file states that CGO is required, it doesn't build: Even if the !cgo build constraints suggest it should build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LanguageProposalIssues describing a requested change to the Go language specification.Proposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions