зеркало из https://github.com/golang/tools.git
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:
Родитель
550322b34f
Коммит
f7b6a898a4
|
@ -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")
|
||||
|
|
Загрузка…
Ссылка в новой задаче