mirror of https://github.com/golang/go.git
internal/lsp: remove unused parameters from moduleAtVersion
Change-Id: I16ed074188fa5f670894778a89cea1a500ec5c7f Reviewed-on: https://go-review.googlesource.com/c/tools/+/397416 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Trust: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
7d125fe075
commit
ff66cbef33
|
|
@ -137,7 +137,7 @@ func goLinks(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle
|
|||
if view.IsGoPrivatePath(target) {
|
||||
continue
|
||||
}
|
||||
if mod, version, ok := moduleAtVersion(ctx, snapshot, target, pkg); ok && strings.ToLower(view.Options().LinkTarget) == "pkg.go.dev" {
|
||||
if mod, version, ok := moduleAtVersion(target, pkg); ok && strings.ToLower(view.Options().LinkTarget) == "pkg.go.dev" {
|
||||
target = strings.Replace(target, mod, mod+"@"+version, 1)
|
||||
}
|
||||
// Account for the quotation marks in the positions.
|
||||
|
|
@ -170,7 +170,7 @@ func goLinks(ctx context.Context, snapshot source.Snapshot, fh source.FileHandle
|
|||
return links, nil
|
||||
}
|
||||
|
||||
func moduleAtVersion(ctx context.Context, snapshot source.Snapshot, target string, pkg source.Package) (string, string, bool) {
|
||||
func moduleAtVersion(target string, pkg source.Package) (string, string, bool) {
|
||||
impPkg, err := pkg.GetImport(target)
|
||||
if err != nil {
|
||||
return "", "", false
|
||||
|
|
|
|||
Loading…
Reference in New Issue