go/internal/lsp/debug
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
..
log
tag
buildinfo_go1.12.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
buildinfo_go1.18.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
info.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
info_test.go internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
metrics.go
rpc.go
serve.go
trace.go