aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_get_moved.txt
blob: edc41cf9488a26f4d53f86c13d79a4e1d4b43fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
env GO111MODULE=on
env GOPROXY=$GOPROXY/quiet
[short] skip

# A 'go get' that worked at a previous version should continue to work at that version,
# even if the package was subsequently moved into a submodule.
go mod init example.com/foo
go get -d example.com/split/subpkg@v1.0.0
go list -m all
stdout 'example.com/split v1.0.0'

# A 'go get' that simultaneously upgrades away conflicting package defitions is not ambiguous.
go get example.com/split/subpkg@v1.1.0

# A 'go get' without an upgrade should find the package.
rm go.mod
go mod init example.com/foo
go get -d example.com/split/subpkg
go list -m all
stdout 'example.com/split/subpkg v1.1.0'


# A 'go get' that worked at a previous version should continue to work at that version,
# even if the package was subsequently moved into a parent module.
rm go.mod
go mod init example.com/foo
go get -d example.com/join/subpkg@v1.0.0
go list -m all
stdout 'example.com/join/subpkg v1.0.0'

# A 'go get' that simultaneously upgrades away conflicting package definitions is not ambiguous.
go get example.com/join/subpkg@v1.1.0

# A 'go get' without an upgrade should find the package.
rm go.mod
go mod init example.com/foo
go get -d example.com/join/subpkg@v1.1.0
go list -m all
stdout 'example.com/join v1.1.0'