go/internal/lsp/cmd/usage
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
..
api-json.hlp
bug.hlp
call_hierarchy.hlp
check.hlp
definition.hlp
fix.hlp gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
folding_ranges.hlp
format.hlp gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
highlight.hlp
implementation.hlp
imports.hlp gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
inspect.hlp gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
licenses.hlp
links.hlp
prepare_rename.hlp
references.hlp gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
remote.hlp gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
rename.hlp gopls: add long forms for all the 1 rune flags 2022-02-02 14:56:23 +00:00
semtok.hlp
serve.hlp gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
signature.hlp
symbols.hlp
usage.hlp gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
version.hlp internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
workspace.hlp gopls: cleanup the main help pages 2022-02-02 14:57:28 +00:00
workspace_symbol.hlp gopls: use the = form in flag parameter printing rather than a space 2022-02-02 14:56:55 +00:00