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

     1  This test checks that hover reports accessible embedded fields
     2  (after the doc comment  and before the accessible methods).
     3  
     4  -- go.mod --
     5  module example.com
     6  
     7  go 1.18
     8  
     9  -- q/q.go --
    10  package q
    11  
    12  type Q struct {
    13  	One int
    14  	two string
    15  	q2[chan int]
    16  }
    17  
    18  type q2[T any] struct {
    19  	Three *T
    20  	four string
    21  }
    22  
    23  -- p.go --
    24  package p
    25  
    26  import "example.com/q"
    27  
    28  // doc
    29  type P struct {
    30  	q.Q
    31  }
    32  
    33  func (P) m() {}
    34  
    35  var p P //@hover("P", "P", P)
    36  
    37  -- @P --
    38  ```go
    39  type P struct {
    40  	q.Q
    41  }
    42  ```
    43  
    44  doc
    45  
    46  
    47  ```go
    48  // Embedded fields:
    49  One   int       // through Q    
    50  Three *chan int // through Q.q2 
    51  ```
    52  
    53  ```go
    54  func (P) m()
    55  ```
    56  
    57  [`p.P` on pkg.go.dev](https://pkg.go.dev/example.com#P)