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

     1  This test verifies behavior of textDocument/documentLink.
     2  
     3  -- go.mod --
     4  module golang.org/lsptests
     5  
     6  go 1.18
     7  -- foo/foo.go --
     8  package foo
     9  
    10  type StructFoo struct {}
    11  
    12  -- links/links.go --
    13  package links //@documentlink(links)
    14  
    15  import (
    16  	"fmt"
    17  
    18  	"golang.org/lsptests/foo"
    19  
    20  	_ "database/sql"
    21  )
    22  
    23  var (
    24  	_ fmt.Formatter
    25  	_ foo.StructFoo
    26  	_ errors.Formatter //@diag("errors", re"(undeclared|undefined)")
    27  )
    28  
    29  // Foo function
    30  func Foo() string {
    31  	/*https://example.com/comment */
    32  
    33  	url := "https://example.com/string_literal"
    34  	return url
    35  
    36  	// TODO(golang/go#1234): Link the relevant issue.
    37  	// TODO(microsoft/vscode-go#12): Another issue.
    38  }
    39  
    40  -- @links --
    41  links/links.go:4:3-6 https://pkg.go.dev/fmt
    42  links/links.go:6:3-26 https://pkg.go.dev/golang.org/lsptests/foo
    43  links/links.go:8:5-17 https://pkg.go.dev/database/sql
    44  links/links.go:21:10-44 https://example.com/string_literal
    45  links/links.go:19:4-31 https://example.com/comment
    46  links/links.go:24:10-24 https://github.com/golang/go/issues/1234
    47  links/links.go:25:10-32 https://github.com/microsoft/vscode-go/issues/12