This test checks the suggested fix to remove unused require statements from
go.mod files, when a go.work file is used.
Note that unlike unusedrequire.txt, we need not write go.sum files when
a go.work file is used.
-- proxy/[email protected]/x.go --
package pkg
const X = 1
-- go.work --
go 1.21
use (
./a
./b
)
-- a/go.mod --
module mod.com/a
go 1.14
require example.com v1.0.0 //@quickfix("require", re"not used", a)
-- @a/a/go.mod --
@@ -4,3 +4 @@
-
-require example.com v1.0.0 //@quickfix("require", re"not used", a)
-
-- a/main.go --
package main
func main() {}
-- b/go.mod --
module mod.com/b
go 1.14
require example.com v1.0.0 //@quickfix("require", re"not used", b)
-- @b/b/go.mod --
@@ -4,3 +4 @@
-
-require example.com v1.0.0 //@quickfix("require", re"not used", b)
-
-- b/main.go --
package main
func main() {}