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

     1  
     2  -- flags --
     3  -ignore_extra_diags
     4  
     5  -- go.mod --
     6  module testy.test
     7  
     8  go 1.18
     9  
    10  -- types/types.go --
    11  package types
    12  
    13  
    14  -- signature/signature.go --
    15  package signature
    16  
    17  type Alias = int
    18  
    19  -- snippets/snippets.go --
    20  package snippets
    21  
    22  import (
    23  	"testy.test/signature"
    24  	t "testy.test/types"
    25  )
    26  
    27  func X(_ map[signature.Alias]t.CoolAlias) (map[signature.Alias]t.CoolAlias) {
    28  	return nil
    29  }
    30  
    31  -- testy/testy.go --
    32  package testy
    33  
    34  func a() { //@item(funcA, "a", "func()", "func")
    35  	//@complete("", funcA)
    36  }
    37  
    38  
    39  -- testy/testy_test.go --
    40  package testy
    41  
    42  import (
    43  	"testing"
    44  
    45  	sig "testy.test/signature"
    46  	"testy.test/snippets"
    47  )
    48  
    49  func TestSomething(t *testing.T) { //@item(TestSomething, "TestSomething(t *testing.T)", "", "func")
    50  	var x int //@loc(testyX, "x"), diag("x", re"x.*declared (and|but) not used")
    51  	a()       //@loc(testyA, "a")
    52  }
    53  
    54  func _() {
    55  	_ = snippets.X(nil) //@signature("nil", "X(_ map[sig.Alias]types.CoolAlias) map[sig.Alias]types.CoolAlias", 0)
    56  	var _ sig.Alias
    57  }
    58  
    59  func issue63578(err error) {
    60  	err.Error() //@signature(")", "Error()", 0)
    61  }