]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add go list -m -f {{.GoMod}} to show path to go.mod file
authorRuss Cox <rsc@golang.org>
Tue, 24 Jul 2018 19:01:22 +0000 (15:01 -0400)
committerRuss Cox <rsc@golang.org>
Sat, 28 Jul 2018 01:14:56 +0000 (01:14 +0000)
commit0cb6b55f43dabdfac8c5afab6d00c9cd65eaadb4
tree245b85939256af50eee85a1cb61a03322e16e731
parent011b6ff8d7b121a0d9c6a7dc899591d89dc9712e
cmd/go: add go list -m -f {{.GoMod}} to show path to go.mod file

"go env GOMOD" gives this for the main module already
but it's useful to be able to query other modules.
Using {{.Dir}} does not work if the go.mod was auto-synthesized.

Change-Id: If4844571e9e429b541de0d40c36ff4c5743b2031
Reviewed-on: https://go-review.googlesource.com/125656
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/list/list.go
src/cmd/go/internal/modinfo/info.go
src/cmd/go/testdata/script/mod_enabled.txt
src/cmd/go/testdata/script/mod_list.txt