]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: reject empty go.mod files
authorMichael Matloob <matloob@golang.org>
Mon, 16 Dec 2019 22:18:06 +0000 (17:18 -0500)
committerMichael Matloob <matloob@golang.org>
Wed, 26 Aug 2020 20:55:41 +0000 (20:55 +0000)
commitd4986e0e1d6e03e1b92e905ca5e01b4c223fbeb3
tree772fce8e02021095fe8272b0d9ccdcc436e8cf7d
parent6f561e65b16645fea771375d3af6d7896ab025e6
cmd/go/internal/modload: reject empty go.mod files

Don't add a module declaration to a go.mod file when
loading a module. Require a user to call go mod init or to
add the module declaration themselves.

Fixes #35070

Change-Id: If5543580d3c1cfee1fc528eb853b872c4173ca82
Reviewed-on: https://go-review.googlesource.com/c/go/+/234107
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/testdata/script/mod_find.txt
src/cmd/go/testdata/script/mod_invalid_path.txt [new file with mode: 0644]