Skip to content

Commit ff66cbe

Browse files
Dylan Lefindleyr
Dylan Le
authored andcommitted
internal/lsp: remove unused parameters from moduleAtVersion
Change-Id: I16ed074188fa5f670894778a89cea1a500ec5c7f Reviewed-on: https://go-review.googlesource.com/c/tools/+/397416 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Findley <[email protected]> Trust: Cherry Mui <[email protected]>
1 parent 7d125fe commit ff66cbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/lsp/link.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func goLinks(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle
137137
if view.IsGoPrivatePath(target) {
138138
continue
139139
}
140-
if mod, version, ok := moduleAtVersion(ctx, snapshot, target, pkg); ok && strings.ToLower(view.Options().LinkTarget) == "pkg.go.dev" {
140+
if mod, version, ok := moduleAtVersion(target, pkg); ok && strings.ToLower(view.Options().LinkTarget) == "pkg.go.dev" {
141141
target = strings.Replace(target, mod, mod+"@"+version, 1)
142142
}
143143
// Account for the quotation marks in the positions.
@@ -170,7 +170,7 @@ func goLinks(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle
170170
return links, nil
171171
}
172172

173-
func moduleAtVersion(ctx context.Context, snapshot source.Snapshot, target string, pkg source.Package) (string, string, bool) {
173+
func moduleAtVersion(target string, pkg source.Package) (string, string, bool) {
174174
impPkg, err := pkg.GetImport(target)
175175
if err != nil {
176176
return "", "", false

0 commit comments

Comments
 (0)