Generate constructors command similar to Generate interface stubs #2507
Labels
FeatureRequest
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Is your feature request related to a problem? Please describe.
No, I guess it's based off of convenience rather than a problem - it relates to development productivity really so it might be considered a problem but not sure I'd personally define it as a problem.
Anyways, I was wondering if there are any plans to add the capability of generating constructors for a given type from the command palette - similar to how the "generate interface stubs" (based on
impl
tool) or "generate unit tests" works.Describe the solution you'd like
Often times, people write constructors such as
NewXxx
for type aXxx
. A similar utility to generate constructors exists in the GoLand IDE and I think it would help boost peoples productivity when working on Go codebases in VSCode.Describe alternatives you've considered
I currently have a working command line utility written in Go that does this exact same thing but as its a command line program I have to context switch to that and use the terminal to run the program (plus I whipped it up quickly to suit my needs so can't say its production quality). I believe a production quality utility like this would benefit the Go community a lot if something like that exists in the official Go extension.
Additional context
I have a working PoC for it, which you can find on my fork of this repository here 😄. The diff can be seen here - in case it is useful.
The text was updated successfully, but these errors were encountered: