mirror of https://github.com/golang/go.git
internal/lsp: make Diagnostics.CodeDescription a pointer
This avoid an embedded URI defaulting to "" (https://github.com/golang/go/issues/42314) Fixes:Fixes golang/go#42314 Change-Id: I614171d4ec80d139f5511b953d30f8385c2c7d5e Reviewed-on: https://go-review.googlesource.com/c/tools/+/267106 Run-TryBot: Peter Weinberger <pjw@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Trust: Peter Weinberger <pjw@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
3288bc1ea1
commit
3f6de07740
|
|
@ -1137,7 +1137,7 @@ type Diagnostic struct {
|
|||
*
|
||||
* @since 3.16.0 - proposed state
|
||||
*/
|
||||
CodeDescription CodeDescription `json:"codeDescription,omitempty"`
|
||||
CodeDescription *CodeDescription `json:"codeDescription,omitempty"`
|
||||
/**
|
||||
* A human-readable string describing the source of this
|
||||
* diagnostic, e.g. 'typescript' or 'super lint'. It usually
|
||||
|
|
|
|||
|
|
@ -509,7 +509,8 @@ function toGo(d: Data, nm: string) {
|
|||
// these fields need a *
|
||||
var starred: [string, string][] = [
|
||||
['TextDocumentContentChangeEvent', 'range'], ['CodeAction', 'command'],
|
||||
['DidSaveTextDocumentParams', 'text'], ['CompletionItem', 'command']
|
||||
['DidSaveTextDocumentParams', 'text'], ['CompletionItem', 'command'],
|
||||
['Diagnostic', 'codeDescription']
|
||||
];
|
||||
|
||||
// generate Go code for an interface
|
||||
|
|
|
|||
Loading…
Reference in New Issue