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

     1  This test demonstrates diagnostics for various forms of file exclusion.
     2  
     3  Note: this test used to also check the errors when a file was excluded due to
     4  an inactive module, or mismatching GOOS/GOARCH, comment, but with zero-config
     5  gopls (golang/go#57979) and improved build tag support (golang/go#29202), we no
     6  longer get these errors.
     7  
     8  -- go.work --
     9  go 1.21
    10  
    11  use (
    12  	./a
    13  )
    14  -- a/go.mod --
    15  module mod.com/a
    16  
    17  go 1.18
    18  
    19  -- a/a.go --
    20  package a
    21  
    22  -- a/a_plan9.go --
    23  package a // Not excluded, due to improved build tag support.
    24  
    25  -- a/a_ignored.go --
    26  //go:build skip
    27  package a //@diag(re"package (a)", re"excluded due to its build tags")
    28  
    29  -- b/go.mod --
    30  module mod.com/b
    31  
    32  go 1.18
    33  
    34  -- b/b.go --
    35  package b // Not excluded, due to zero-config gopls.
    36