-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate interface stubs adds structs parameter with package name #2364
Comments
Interface stub generation is provided by https://github.com/josharian/impl. There is some discussion around supporting package-local interface in josharian/impl#14. Do you get the expected result if you use the unqualified interface identifier for the input (i.e. "c *categoryResponse CategoryRepository" instead of "c *categoryResponse repo.CategoryRepository" )? |
Looks like this is the old way of generating interface stub (that's based on If you generate the stub using the gopls's code action (see below), do you still observe the same issue? (note: this gopls-based workflow currently requires some hints. For example, in my screenshot, I gave a dummy I still feel this gopls-based workflow is harder to find compared to the original command-style implementation. In |
@jamalc I get this error
|
@hyangah Yes this works. |
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Generate interface stubs
When generate interface stubs for interface in same file it adds the package name for parameter.
When generate interface stubs for interface in same file it shouldn't add the package name.
Screenshots or recordings
screencast_00000.mp4
The text was updated successfully, but these errors were encountered: