This is a regression caused by replacement of go-outline with gopls.
The document symbol provider using go-outline marks methods as function, while gopls correctly marks methods as methods. The tests didn't catch this because for this test, languageClient and gopls was not initialized, so the old code path (that uses go-outline was used :-() I did manual testing. We will merge your PR and follow up with test fix. cc @suzmue
changed the title
x/tools/gopls: No function found at cursor when generate unit test for function Mar 4, 2022