github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_get_patterns.txt (about) 1 env GO111MODULE=on 2 [short] skip 3 4 # If a pattern doesn't match any packages provided by modules 5 # in the build list, we assume the pattern matches a single module 6 # whose path is a prefix of the part of the pattern before "...". 7 cp go.mod.orig go.mod 8 go get -d rsc.io/quote/... 9 grep 'require rsc.io/quote' go.mod 10 11 cp go.mod.orig go.mod 12 ! go get -d rsc.io/quote/x... 13 stderr 'go get rsc.io/quote/x...: module rsc.io/quote@upgrade found \(v1.5.2\), but does not contain packages matching rsc.io/quote/x...' 14 ! grep 'require rsc.io/quote' go.mod 15 16 ! go get -d rsc.io/quote/x/... 17 stderr 'go get rsc.io/quote/x/...: module rsc.io/quote@upgrade found \(v1.5.2\), but does not contain packages matching rsc.io/quote/x/...' 18 ! grep 'require rsc.io/quote' go.mod 19 20 # If a pattern matches no packages within a module, the module should not 21 # be upgraded, even if the module path matches the pattern. 22 cp go.mod.orig go.mod 23 go mod edit -require example.com/nest@v1.0.0 24 go get -d example.com/nest/sub/y... 25 grep 'example.com/nest/sub v1.0.0' go.mod 26 grep 'example.com/nest v1.0.0' go.mod 27 28 -- go.mod.orig -- 29 module m 30 31 go 1.13 32 33 -- use/use.go -- 34 package use 35 36 import _ "rsc.io/quote"