Skip to content

proposal: cmd/go: force vendor directory only #19234

@azr

Description

@azr

Hello there,

TLDR: it would be nice to be able to go build --using-vendors-only or something similar.

More thought:
I like a revision of a go project to be buildable.
Often when I update the vendors of a project, the ci tools tell me there is a missing dep or something is wrong with this or that dep, because that other pkg is outdated, because the system are different or other various reasons.
But it always works locally and then I find myself having a lot commits that contain fix godeps

So I'd like to have a pre commit hook that checks if the project builds in my ci.

that hook would do something like this: GOOS=linux go build --using-vendors-only

Tried GOOS=linux go build -pkgdir ./vendor but nope

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions