1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:18:35 -06:00
go/internal
Ian Cottrell 434f7a8fef internal/jsonrpc2: add concrete types for Call, Notify and Response
The previous implementation was exposing the details of the wire format
and resulted in non idomatic go, detecting the presence of absence of
values in fields to deterimine the message type.
Now the messages are distinct types and we use type switches instead.
Request still exists as an interface to expose the shared behaviour of
Call and Notification, as this is the type accepted by handlers.
The set of messages is deliberately closed by using a private methods on the
interfaces.

Change-Id: I2cf15ee3923ef4688670c62896f81f760c77fe04
Reviewed-on: https://go-review.googlesource.com/c/tools/+/228719
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-04-20 21:05:32 +00:00
..
analysisinternal internal/lsp: add goreturns like functionality as quickfix 2020-04-01 19:27:44 +00:00
apidiff all: fix more typos 2019-09-11 15:13:14 +00:00
fastwalk internal/fastwalk: fix checkptr failure on Darwin 2020-02-27 19:33:42 +00:00
gocommand internal/lsp/cache: add concurrency error check for go cmds 2020-04-08 03:22:09 +00:00
gopathwalk internal: rationalize debug logging 2020-03-03 16:59:18 +00:00
imports internal/imports: update stdlib index for 1.14 2020-04-20 00:18:25 +00:00
jsonrpc2 internal/jsonrpc2: add concrete types for Call, Notify and Response 2020-04-20 21:05:32 +00:00
lsp internal/jsonrpc2: add concrete types for Call, Notify and Response 2020-04-20 21:05:32 +00:00
memoize internal/lsp/debug: serve cache entry counts 2020-02-03 22:21:18 +00:00
packagesinternal internal/lsp/cache: add concurrency error check for go cmds 2020-04-08 03:22:09 +00:00
proxydir internal/proxydir: add an internal package for file-based proxies 2020-04-13 22:35:07 +00:00
span internal/span: handle URI escaping better 2020-02-18 20:59:02 +00:00
telemetry internal/telemetry: add support for using telemetry in tests 2020-04-20 21:04:52 +00:00
testenv internal/testenv: reject the resolved 'go' command if it does not match runtime.GOROOT 2019-11-11 19:22:22 +00:00
tool internal/tool: avoid editorialization 2020-03-05 14:01:59 +00:00
xcontext internal/lsp: stop making background contexts everywhere 2019-07-11 16:38:52 +00:00