...
1go work use -r foo
2cmp go.work go.want_work_r
3
4! go work use other
5stderr '^go: error reading other'${/}'go.mod: missing module declaration'
6
7go mod edit -C other -module=other
8go work use other
9cmp go.work go.want_work_other
10-- go.work --
11go 1.18
12
13use (
14 foo
15 foo/bar // doesn't exist
16)
17-- go.want_work_r --
18go 1.18
19
20use (
21 ./foo
22 ./foo/bar/baz
23)
24-- go.want_work_other --
25go 1.18
26
27use (
28 ./foo
29 ./foo/bar/baz
30 ./other
31)
32-- foo/go.mod --
33module foo
34-- foo/bar/baz/go.mod --
35module baz
36-- other/go.mod --
View as plain text