internal/lsp/source: fix go1.12 build (again)
A recent change (silently) broke our go1.12 presubmit, because we don't
yet have a means to surface this breakage. Coming soon: a 'gopls CI'
custom Gerrit label.
In the meantime, fix the build.
Change-Id: I31f5b7512403fdbd8869652cd4b8e77b084c8534
Reviewed-on: https://go-review.googlesource.com/c/tools/+/253517
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/internal/lsp/source/completion_package.go b/internal/lsp/source/completion_package.go
index e88400c..3b82a86 100644
--- a/internal/lsp/source/completion_package.go
+++ b/internal/lsp/source/completion_package.go
@@ -42,7 +42,7 @@
surrounding, err := packageCompletionSurrounding(ctx, snapshot.FileSet(), fh, pgf, rng.Start)
if err != nil {
- return nil, nil, fmt.Errorf("invalid position for package completion: %w", err)
+ return nil, nil, errors.Errorf("invalid position for package completion: %w", err)
}
packageSuggestions, err := packageSuggestions(ctx, snapshot, fh.URI(), "")