x/tools/gopls: offer test function snippets as completion candidates in test files #61210
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Suggestion by way of @pjweinb: when typing a new function declaration in a test file (
*_test.go
), we could offer completion items for untested exported functions in the non-test package.For example, if package
p
defines functionFoo
, we could offer the completion suggestionfunc TestFoo
when typing inp_test.go
.Extra credit: populate the completion snippet with a test body that sets up a table-driven test for the function in question.
The text was updated successfully, but these errors were encountered: