Debian Codegraph @

gopls/internal/test/marker/testdata/quickfix/unusedrequire_gowork.txt

raw
1 This test checks the suggested fix to remove unused require statements from
2 go.mod files, when a go.work file is used.
3
4 Note that unlike unusedrequire.txt, we need not write go.sum files when
5 a go.work file is used.
6
7 -- proxy/[email protected]/x.go --
8 package pkg
9 const X = 1
10
11 -- go.work --
12 go 1.21
13
14 use (
15 ./a
16 ./b
17 )
18 -- a/go.mod --
19 module mod.com/a
20
21 go 1.14
22
23 require example.com v1.0.0 //@quickfix("require", re"not used", a)
24
25 -- @a/a/go.mod --
26 @@ -4,3 +4 @@
27 -
28 -require example.com v1.0.0 //@quickfix("require", re"not used", a)
29 -
30 -- a/main.go --
31 package main
32 func main() {}
33
34 -- b/go.mod --
35 module mod.com/b
36
37 go 1.14
38
39 require example.com v1.0.0 //@quickfix("require", re"not used", b)
40
41 -- @b/b/go.mod --
42 @@ -4,3 +4 @@
43 -
44 -require example.com v1.0.0 //@quickfix("require", re"not used", b)
45 -
46 -- b/main.go --
47 package main
48 func main() {}