go/internal/lsp/cmd
Hana 6aaba7740f internal/lsp/debug: add go version to gopls version output
Add -json flag to output in JSON format.

Include the Go version info
  - go1.18: runtime/debug.BuildInfo.GoVersion
  - pre go1.18: runtime.Version

Restructure ServiceVersion so we embed info from
runtime/debug.BuildInfo. Instead of directly using
runtime/debug.BuildInfo, we use our own BuildInfo type.
That allows:
  for go1.17 or older versions, we can add GoVersion.
  for go1.18, we can drop MarshalText that prevents
  JSON encoding other languages and human can understand
  (golang/go#51026)

For golang/go#49783

Change-Id: Ia5ab50ce1f5e6c3a912654834785ecea7f5034e2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/382274
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-02-07 15:39:03 +00:00
..
test gopls: write out the raw usage text 2022-02-02 14:51:55 +00:00
usage internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
call_hierarchy.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
capabilities_test.go internal/lsp: remove some unused parameters, mostly in the cache package 2021-03-25 00:26:08 +00:00
check.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
cmd.go gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
cmd_test.go internal/lsp/cmd: delete TestDefinitionHelpExample test 2020-11-03 23:54:15 +00:00
definition.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
export_test.go internal/lsp: refactor query definition test to allow adding a new test 2019-03-18 20:06:54 +00:00
folding_range.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
format.go gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
help_test.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
highlight.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
implementation.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
imports.go gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
info.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
links.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
prepare_rename.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
references.go gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
remote.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
rename.go gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
semantictokens.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
serve.go gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
signature.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
subcommands.go gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
suggested_fix.go gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
symbols.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
workspace.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00
workspace_symbol.go gopls: take control of the flag printing 2022-02-02 14:52:21 +00:00