1
0
mirror of https://github.com/golang/go synced 2024-11-06 08:36:14 -07:00
go/internal/lsp/diff
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
..
diff_test.go internal/lsp: normalise and make public diff<->edit conversions 2019-04-15 20:31:36 +00:00
diff.go internal/lsp: normalise and make public diff<->edit conversions 2019-04-15 20:31:36 +00:00
unified.go internal/lsp: normalise and make public diff<->edit conversions 2019-04-15 20:31:36 +00:00