Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/lsp/tests: simplify collectCompletionItems, remove Data.t
The marker function collectCompletionItems required at least three arguments. Express this in its signature, leaving a final variadic argument for documentation. I considered just making this final argument mandatory, but opted for minimizing the diff given that there are 400+ existing @item annotations. With this change the only use of tests.Data.t is in mustRange. Since conversion to range should always succeed, I switched this usage to a panic and removed the t field. For golang/go#54845 Change-Id: I407f07cb85fa1356ceb6dba366007f69d1b6a068 Reviewed-on: https://go-review.googlesource.com/c/tools/+/432337 Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
- Loading branch information