aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_tidy_indirect.txt
blob: 1f092b223bd6357914de5e52b0eab24d094a14d0 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cp go.mod go.mod.orig
go mod tidy
cmp go.mod go.mod.orig

-- go.mod --
module example.com/tidy

go 1.16

require (
	example.net/incomplete v0.1.0
	example.net/indirect v0.2.0 // indirect
	example.net/toolow v0.1.0
)

replace (
	example.net/incomplete v0.1.0 => ./incomplete
	example.net/indirect v0.1.0 => ./indirect.1
	example.net/indirect v0.2.0 => ./indirect.2
	example.net/toolow v0.1.0 => ./toolow
)
-- tidy.go --
package tidy

import (
	_ "example.net/incomplete"
	_ "example.net/toolow"
)

-- incomplete/go.mod --
module example.net/incomplete

go 1.16

// This module omits a needed requirement on example.net/indirect.
-- incomplete/incomplete.go --
package incomplete

import _ "example.net/indirect/newpkg"

-- toolow/go.mod --
module example.net/toolow

go 1.16

require example.net/indirect v0.1.0
-- toolow/toolow.go --
package toolow

import _ "example.net/indirect/oldpkg"

-- indirect.1/go.mod --
module example.net/indirect

go 1.16
-- indirect.1/oldpkg/oldpkg.go --
package oldpkg


-- indirect.2/go.mod --
module example.net/indirect

go 1.16
-- indirect.2/oldpkg/oldpkg.go --
package oldpkg
-- indirect.2/newpkg/newpkg.go --
package newpkg