1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:58:34 -06:00
go/internal
Ian Cottrell 744a51dd88 internal/lsp: normalise and make public diff<->edit conversions
This allows us to use the diff.ApplyEdits in tests, saving us from a different
implementation.
It also prepares for command lines that need to use diff features based on the
results of a protocol message.

Splitting content into lines is too easy to get wrong, and needs to be done
correctly or the diff results make no sense. This adds the SplitLines function
to the diff pacakge to do it right and then uses it everwhere we we already
doing it wrong.

It also makes all the diff tests external black box tests.

Change-Id: I698227d5769a2bfbfd22a64ea42906b1df9268d9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/171027
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-04-15 20:31:36 +00:00
..
apidiff apidiff: fix old reference to golang.org/x/exp 2019-04-10 19:41:13 +00:00
fastwalk internal/fastwalk: avoid slice bounds out of range for long file names 2018-11-12 23:16:31 +00:00
gopathwalk imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
jsonrpc2 internal/jsonrpc2: fix bug in direction logging of call responses 2019-04-06 16:55:26 +00:00
lsp internal/lsp: normalise and make public diff<->edit conversions 2019-04-15 20:31:36 +00:00
module imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
semver go/packages: add name= query 2018-10-16 20:20:09 +00:00
span internal/lsp: unescape uris before we convert them to span.URI 2019-03-27 16:50:41 +00:00
tool internal/tool: add a small package to unify the flag handling across all our tools 2018-12-17 23:08:00 +00:00
txtar imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00