1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
11 "golang.org/x/tools/internal/lsp/protocol"
12 "golang.org/x/tools/internal/lsp/tests"
13 "golang.org/x/tools/internal/span"
16 func (r *runner) Link(t *testing.T, uri span.URI, wantLinks []tests.Link) {
17 m, err := r.data.Mapper(uri)
21 out, _ := r.NormalizeGoplsCmd(t, "links", "-json", uri.Filename())
22 var got []protocol.DocumentLink
23 err = json.Unmarshal([]byte(out), &got)
27 if diff := tests.DiffLinks(m, wantLinks, got); diff != "" {