]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modcmd: loosen path validation in "go mod edit"
authorBryan C. Mills <bcmills@google.com>
Fri, 6 Dec 2019 20:51:34 +0000 (15:51 -0500)
committerBryan C. Mills <bcmills@google.com>
Fri, 6 Dec 2019 23:45:07 +0000 (23:45 +0000)
commitea89ce1ea2924138591cbf7362eb23d4e1399ded
tree7c640ae1e7772593fad80615cfe6ebce75034041
parent94ddb2d6217e3d031cfacb8eed68786df9227bf1
cmd/go/internal/modcmd: loosen path validation in "go mod edit"

Replaced modules require only valid import paths, not full
module paths that can be fetched with 'go get'.

The 'go' command does not in general reject manually-edited go.mod
files with these paths, so 'go mod edit' should not reject them
either.

Fixes #30513

Change-Id: I4f1a5c65937f91d41478f8d218c8018e0c70f320
Reviewed-on: https://go-review.googlesource.com/c/go/+/210343
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modcmd/edit.go
src/cmd/go/testdata/script/mod_edit.txt