golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/fixedbugs/issue59318.txt (about)

     1  Previously, this test verifies that we can load multiple orphaned files as
     2  command-line-arguments packages. In the distant past, we would load only one
     3  because go/packages returns at most one command-line-arguments package per
     4  query.
     5  
     6  With zero-config gopls, these packages are successfully loaded as ad-hoc
     7  packages.
     8  
     9  -- a/main.go --
    10  package main
    11  
    12  func main() {
    13  	var a int //@diag(re"var (a)", re"not used")
    14  }
    15  -- b/main.go --
    16  package main
    17  
    18  func main() {
    19  	var b int //@diag(re"var (b)", re"not used")
    20  }