github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_get_moved.txt (about) 1 env GO111MODULE=on 2 env GOPROXY=$GOPROXY/quiet 3 [short] skip 4 5 # A 'go get' that worked at a previous version should continue to work at that version, 6 # even if the package was subsequently moved into a submodule. 7 go mod init example.com/foo 8 go get -d example.com/split/subpkg@v1.0.0 9 go list -m all 10 stdout 'example.com/split v1.0.0' 11 12 # A 'go get' that simultaneously upgrades away conflicting package defitions is not ambiguous. 13 go get example.com/split/subpkg@v1.1.0 14 15 # A 'go get' without an upgrade should find the package. 16 rm go.mod 17 go mod init example.com/foo 18 go get -d example.com/split/subpkg 19 go list -m all 20 stdout 'example.com/split/subpkg v1.1.0' 21 22 23 # A 'go get' that worked at a previous version should continue to work at that version, 24 # even if the package was subsequently moved into a parent module. 25 rm go.mod 26 go mod init example.com/foo 27 go get -d example.com/join/subpkg@v1.0.0 28 go list -m all 29 stdout 'example.com/join/subpkg v1.0.0' 30 31 # A 'go get' that simultaneously upgrades away conflicting package definitions is not ambiguous. 32 go get example.com/join/subpkg@v1.1.0 33 34 # A 'go get' without an upgrade should find the package. 35 rm go.mod 36 go mod init example.com/foo 37 go get -d example.com/join/subpkg@v1.1.0 38 go list -m all 39 stdout 'example.com/join v1.1.0'