1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:14:43 -07:00
go/gopls/internal
Rob Findley c8d9e05b1c 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>
2020-09-16 12:40:19 +00:00
..
hooks internal/lsp: handle staticcheck in didChangeConfiguration 2020-09-13 03:21:22 +00:00
regtest gopls/internal/regtest: simplify expectation return values 2020-09-16 12:40:19 +00:00