1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:14:46 -07:00

internal/lsp: remove unused range parameter from computeTextEdits

Change-Id: I3e9853b2a83d0328d10bcb75fc9f1f1cc996f14e
Reviewed-on: https://go-review.googlesource.com/c/163157
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Ian Cottrell 2019-02-20 12:20:02 -05:00
parent 550322b34f
commit f7b6a898a4

View File

@ -52,7 +52,7 @@ func Format(ctx context.Context, f File, rng Range) ([]TextEdit, error) {
if err := format.Node(buf, fset, node); err != nil {
return nil, err
}
return computeTextEdits(rng, f, buf.String()), nil
return computeTextEdits(f, buf.String()), nil
}
// Imports formats a file using the goimports tool.
@ -61,10 +61,10 @@ func Imports(ctx context.Context, f File, rng Range) ([]TextEdit, error) {
if err != nil {
return nil, err
}
return computeTextEdits(rng, f, string(formatted)), nil
return computeTextEdits(f, string(formatted)), nil
}
func computeTextEdits(rng Range, file File, formatted string) (edits []TextEdit) {
func computeTextEdits(file File, formatted string) (edits []TextEdit) {
u := strings.SplitAfter(string(file.GetContent()), "\n")
tok := file.GetToken()
f := strings.SplitAfter(formatted, "\n")