Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go vet to use -mod=vendor by default #33262

Closed
ialidzhikov opened this issue Jul 24, 2019 · 2 comments
Closed

cmd/go: go vet to use -mod=vendor by default #33262

ialidzhikov opened this issue Jul 24, 2019 · 2 comments

Comments

@ialidzhikov
Copy link

@ialidzhikov ialidzhikov commented Jul 24, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.7 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

What did you expect to see?

$ go vet github.com/ialidzhikov/gomod-example
go: finding github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4
go: finding github.com/kr/pretty v0.1.0
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127

go vet does module resolution and requites network connectivity. Running with GOPROXY=off:

$ GOPROXY=off go vet github.com/ialidzhikov/gomod-example
go: gopkg.in/yaml.v2@v2.2.2: module lookup disabled by GOPROXY=off
go: github.com/kr/pretty@v0.1.0: module lookup disabled by GOPROXY=off
go: github.com/ghodss/yaml@v0.0.0-20180820084758-c7ce16629ff4: module lookup disabled by GOPROXY=off
go: gopkg.in/check.v1@v1.0.0-20180628173108-788fd7840127: module lookup disabled by GOPROXY=off
go: error loading module requirements

I would expect from a tools such as go vet that performs static checks to do not require module resolution/network connectivity.

What did you see instead?

@mvdan

This comment has been minimized.

Copy link
Member

@mvdan mvdan commented Jul 25, 2019

Duplicate of #27227? I'm pretty sure that go vet loads packages like other go commands.

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 25, 2019

Duplicate of #27227

@bcmills bcmills marked this as a duplicate of #27227 Jul 25, 2019
@bcmills bcmills closed this Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.