Skip to content

Avo needs GOARCH to be set to find build-tagged stubs #450

@FiloSottile

Description

@FiloSottile

If you use Package and Implements calls to implement a stub, and the stub is only in a file tagged _amd64.go, generation will fail if run on e.g. darwin/arm64.

This can be worked around by simply adding the following two lines to main().

os.Setenv("GOOS", "linux")
os.Setenv("GOARCH", "amd64")

This is mostly an annoyance, but it could led to incorrect code being generated if a function with the same name but with different types is defined in a non-amd64 file which matches the host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions