From ed3277de27998232ef7586f5f0d01384bfa52c37 Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Tue, 30 Jul 2019 23:37:57 +0200 Subject: [PATCH] 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 Run-TryBot: Emmanuel Odeke TryBot-Result: Gobot Gobot --- internal/lsp/telemetry/ocagent/ocagent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lsp/telemetry/ocagent/ocagent.go b/internal/lsp/telemetry/ocagent/ocagent.go index faef9541..5e2439e6 100644 --- a/internal/lsp/telemetry/ocagent/ocagent.go +++ b/internal/lsp/telemetry/ocagent/ocagent.go @@ -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), } }