]> Cypherpunks repositories - gostls13.git/commit
cmd/go: don't import requirements into existing go.mod files
authorJay Conrod <jayconrod@google.com>
Thu, 22 Oct 2020 22:26:14 +0000 (18:26 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 23 Oct 2020 20:54:12 +0000 (20:54 +0000)
commitc8c3c29daa74f2d3e1a26f2e289ad3d2b9ba20dd
tree3e82a47435d9563abd45380c8b7dfc8baa15e31b
parentd1b1145cace8b968307f9311ff611e4bb810710c
cmd/go: don't import requirements into existing go.mod files

Previously, if a go.mod file was present, and it only contained a
module directive, any module-aware command would attempt to import
requirements from a vendor configuration file like Gopkg.lock.

This CL removes that functionality. It was undocumented and untested,
and it can cause problems with -mod=readonly. It should never come up
for go.mod files created with 'go mod init', since they have a "go"
directive.

For #40278

Change-Id: I64c0d67d204560aa5c775d29553883d094fd3b72
Reviewed-on: https://go-review.googlesource.com/c/go/+/264620
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/go/internal/modload/init.go