aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/work_module_not_in_go_work.txt
blob: 23d908c3022441934dc287b33d7441c73c66239f (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
# This is a regression test for issue #49632.
# The Go command should mention go.work if the user
# tries to load a local package that's in a module
# that's not in go.work and can't be resolved.

! go list ./...
stderr 'pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies'

! go list ./a
stderr 'directory a outside modules listed in go.work'

-- go.work --
go 1.18

use ./b
-- a/go.mod --
module example.com/a

go 1.18
-- a/a.go --
package a
-- b/go.mod --
module example.com/b

go 1.18