Skip to content

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

Closed
@ialidzhikov

Description

@ialidzhikov

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/[email protected]: module lookup disabled by GOPROXY=off
go: github.com/kr/[email protected]: module lookup disabled by GOPROXY=off
go: github.com/ghodss/[email protected]: module lookup disabled by GOPROXY=off
go: gopkg.in/[email protected]: 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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions