From 069601f3714ee8c0caa1075f1946b1e466c18b67 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Tue, 5 Feb 2019 12:58:32 -0500 Subject: [PATCH] internal/lsp: use interface for diagnostics code Since the diagnostics code can be either a string or a number, use an empty interface. Change-Id: Ie1a4183b5c82ef177176075828511070ae3520bd Reviewed-on: https://go-review.googlesource.com/c/161217 Run-TryBot: Rebecca Stambler Reviewed-by: Ian Cottrell TryBot-Result: Gobot Gobot --- internal/lsp/protocol/basic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/lsp/protocol/basic.go b/internal/lsp/protocol/basic.go index 0dd2f5e4ed..a8bd96ced2 100644 --- a/internal/lsp/protocol/basic.go +++ b/internal/lsp/protocol/basic.go @@ -106,7 +106,7 @@ type Diagnostic struct { /** * The diagnostic's code, which might appear in the user interface. */ - Code string `json:"code,omitempty"` // number | string + Code interface{} `json:"code,omitempty"` // number | string /** * A human-readable string describing the source of this