Skip to content

Conversation

@nvartolomei
Copy link
Contributor

@nvartolomei nvartolomei commented Dec 6, 2018

Before go modules, go list worked flawlessly, using vendor directory first and then looking in GOPATH for packages.

Since modules were introduce, vendor directory is used differently, by default vendor directory seems to be ignored.

Finer grain control on whether or not go.mod is allowed to be updated, how vendor directory is used, and whether or not network access is allowed (e.g., -mod=readonly, -mod=vendor, GOPROXY=off)

This may work ok locally, but for CI/CD purposes I want to always use files in the vendor directory, at least for the time being (more than that, CI does not have access to fetch external resources).

golangci-lint is executing go list, in order to make it work under the constraint described above it should be possible to pass -mod=vendor flag to go list.

Feel free to adjust the PR before merging.

@CLAassistant
Copy link

CLAassistant commented Dec 6, 2018

CLA assistant check
All committers have signed the CLA.

@nvartolomei
Copy link
Contributor Author

Looks like this can be also achieved by setting GOFLAGS environment variable.

export GOFLAGS="-mod=vendor"

@jirfag
Copy link
Contributor

jirfag commented Dec 22, 2018

hi, thank you! I'll include it into #328 and make some changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants