gopls/internal/lsp/mod: highlight when there is no fix for vuln

Change-Id: If53455159b8578901ff728640e9c1ec671c61cdb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/451695
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Hana (Hyang-Ah) Kim 2022-11-16 19:27:06 -05:00 committed by Hyang-Ah Hana Kim
parent 128f61d438
commit 8ba9a370ee
1 changed files with 2 additions and 2 deletions

View File

@ -179,13 +179,13 @@ func formatVulnerabilities(modPath string, affecting, nonaffecting []*govulnchec
}
func fixedVersionInfo(v *govulncheck.Vuln, modPath string) string {
fix := "No fix is available."
fix := "\n**No fix is available.**"
for _, m := range v.Modules {
if m.Path != modPath {
continue
}
if m.FixedVersion != "" {
fix = "Fixed in " + m.FixedVersion + "."
fix = "\nFixed in " + m.FixedVersion + "."
}
break
}