internal/lsp: use correct desc for annotation

If the message is empty and there is and there is an error,
the description of the annotation should be the error message.

More info can be found here:
https://go-review.googlesource.com/c/tools/+/186679

Change-Id: Ica0a9cc132de912b2e14ab527baf4304f8b5d8ba
Reviewed-on: https://go-review.googlesource.com/c/tools/+/188118
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Odin Ugedal 2019-07-30 23:37:57 +02:00 committed by Emmanuel Odeke
parent 7deaedd405
commit ed3277de27
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ func convertAnnotation(tags tag.List) *wire.Annotation {
tags = append(tags, tag.Of("Error", entry.Error))
}
return &wire.Annotation{
Description: toTruncatableString(entry.Message),
Description: toTruncatableString(description),
Attributes: convertAttributes(tags),
}
}