Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: go list should not add a dependency to go.mod #28014
This is probably a duplicate of #27643. The thread got too long and I want to bring the attention to the go list command by filling this as a separate issue.
I was in a branch with a v2 module and this doesn't have a dependency on v0 or v1.
$ go list github.com/hyangah/foo/v2 github.com/hyangah/foo/v2 $ cat go.mod module github.com/hyangah/foo/v2
I queried the package in v1 by accident and found the go.mod was updated.
$ go list github.com/hyangah/foo github.com/hyangah/foo $ cat go.mod module github.com/hyangah/foo/v2 require github.com/hyangah/foo v1.0.1 // indirect