1
0
mirror of https://github.com/golang/go synced 2024-11-19 01:44:40 -07:00
go/internal/lsp/cmd
Ian Cottrell 2f43c6d1a2 internal/span: change to private fields
Change span to hide its fields and have validating accessors
This catches the cases where either the offset or the position is being used
when it was not set.
It also normalizes the forms as the API now controls them, and allows us to
simplify some of the logic.
The converters are now allowed to return an error, which lets us cleanly
propagate bad cases.
The lsp was then converted to the new format, and also had some error checking
of its own added on the top.
All this allowed me to find and fix a few issues, most notably a case where the
wrong column mapper was being used during the conversion of definition results.

Change-Id: Iebdf8901e8269b28aaef60caf76574baa25c46d4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/167858
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-03-15 18:05:47 +00:00
..
testdata internal/lsp: convert to the new location library 2019-03-13 19:34:21 +00:00
cmd.go internal/lsp: use parallel parse files function 2019-02-13 04:21:09 +00:00
definition_test.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
definition.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
export_test.go internal/lsp/cmd: add the definition mode 2019-01-31 16:39:42 +00:00
query.go internal/lsp/cmd: fix a nil pointer and some minor clean-up 2019-02-06 04:15:39 +00:00
serve.go lsp/internal: fix incorrectly formatted file 2019-02-13 16:29:12 +00:00