mirror of https://github.com/golang/go.git
gopls/internal/lsp/mod: deleted unused function pkgVersion
Change-Id: I85cabd92a1ee28f60ad355c4f44577e0ccc0bd07 Reviewed-on: https://go-review.googlesource.com/c/tools/+/448977 gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Peter Weinberger <pjw@google.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
bc08991678
commit
4a8413c694
|
|
@ -165,21 +165,6 @@ func ModUpgradeDiagnostics(ctx context.Context, snapshot source.Snapshot, fh sou
|
|||
return upgradeDiagnostics, nil
|
||||
}
|
||||
|
||||
func pkgVersion(pkgVersion string) (pkg, ver string) {
|
||||
if pkgVersion == "" {
|
||||
return "", ""
|
||||
}
|
||||
at := strings.Index(pkgVersion, "@")
|
||||
switch {
|
||||
case at < 0:
|
||||
return pkgVersion, ""
|
||||
case at == 0:
|
||||
return "", pkgVersion[1:]
|
||||
default:
|
||||
return pkgVersion[:at], pkgVersion[at+1:]
|
||||
}
|
||||
}
|
||||
|
||||
const upgradeCodeActionPrefix = "Upgrade to "
|
||||
|
||||
// ModVulnerabilityDiagnostics adds diagnostics for vulnerabilities in individual modules
|
||||
|
|
|
|||
Loading…
Reference in New Issue