-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/regtest: simplify expectation return values
Returning 'metBy' from expectations was not an ideal API, as extracting the result value was cumbersome and error prone. It also forced quite a bit of plumbing. Using OnceMet, we can improve this by instead using a 'ReadDiagnostics' expectation that reads diagnostics into a variable. For golang/go#39384 Change-Id: Ia73e5b496089240df3200626e5696305cb507c9a Reviewed-on: https://go-review.googlesource.com/c/tools/+/255126 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
- Loading branch information
Showing
5 changed files
with
135 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.