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

     1  This test demonstrates some features of the new marker test runner.
     2  
     3  Requires go1.19+ for the new go/doc/comment package.
     4  
     5  -- flags --
     6  -min_go=go1.19
     7  
     8  -- a.go --
     9  package a
    10  
    11  const abc = 0x2a //@hover("b", "abc", abc),hover(" =", "abc", abc)
    12  -- typeswitch.go --
    13  package a
    14  
    15  func _() {
    16  	var y interface{}
    17  	switch x := y.(type) { //@hover("x", "x", x)
    18  	case int:
    19  		println(x) //@hover("x", "x", xint),hover(")", "x", xint)
    20  	}
    21  }
    22  -- @abc --
    23  ```go
    24  const abc untyped int = 0x2a // 42
    25  ```
    26  
    27  @hover("b", "abc", abc),hover(" =", "abc", abc)
    28  -- @x --
    29  ```go
    30  var x interface{}
    31  ```
    32  -- @xint --
    33  ```go
    34  var x int
    35  ```