go/gopls/internal/lsp/protocol
Peter Weinbergr 45ad958c90 gopls/internal/lsp/protocol: fix json tags and indirect some zero values
Some of the json tags, especially for constructed structs, had improper
json tags (e.g., Range *Range `json:"Range"`, not `json:"range"). These
now start with lower-case letters.

Also, an optional field which is a struct type could be either
F FsType `json:"f,omitempty"`, or
F *FsType `json:"f,omitempty".

The second is generally better, as zero values should not be sent,
but there are many cases where the existing
code needs the first, to avoid allocations.

That is, if we're sending an empty optional field, there should be a *,
but if we're intializing a complicated structure (x.A.B.C.D = true, with
B and C optional) existing code wants no *. (These two cases could
conflict, and then the existing code would have to be changed.)

Fixes golang/go#55099

Change-Id: I947a69322bcddf4c963d34662b72b464b738d17c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/431218
Run-TryBot: Peter Weinberger <pjw@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-09-16 20:08:00 +00:00
..
typescript gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
codeactionkind.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
context.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
doc.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
enums.go internal/lsp: latest version of LSP stubs 2022-09-13 15:21:19 +00:00
log.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
protocol.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
span.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
tsclient.go gopls/internal/lsp/protocol: fix json tags and indirect some zero values 2022-09-16 20:08:00 +00:00
tsdocument_changes.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
tsjson.go gopls/internal/lsp/protocol: fix json tags and indirect some zero values 2022-09-16 20:08:00 +00:00
tsprotocol.go gopls/internal/lsp/protocol: fix json tags and indirect some zero values 2022-09-16 20:08:00 +00:00
tsserver.go gopls/internal/lsp/protocol: fix json tags and indirect some zero values 2022-09-16 20:08:00 +00:00