refactor generated command & subcommand boilerplate#14
refactor generated command & subcommand boilerplate#14jxsl13 wants to merge 1 commit intospf13:mainfrom
Conversation
|
@johnSchnake please review |
jpmcb
left a comment
There was a problem hiding this comment.
Hi there - thanks for providing this.
Overall, looks good but I'm wondering if we want to do some work to define the recommended approach in our docs and examples before we go forward with merging this.
I like the idea of removing the init chunks
John S. has good eyes on this too, so would also like his input.
I think @marckhouzam can give some recommendation here too as to what Helm does.
|
This PR is being marked as stale due to a long period of inactivity |
|
Still haven't gotten around to this one. Sorry. |
|
No worries!!!! We can mark this for post v1.5.0 if that makes sense? |
|
This PR is being marked as stale due to a long period of inactivity |
|
blub |
|
This PR is being marked as stale due to a long period of inactivity |
|
This PR is being marked as stale due to a long period of inactivity |
|
This PR is being marked as stale due to a long period of inactivity |
|
This PR is being marked as stale due to a long period of inactivity |
|
This PR is being marked as stale due to a long period of inactivity |
rootCmd.AddCommand(NewSubCommand())inside of the constructorNewRootCmd()which would be quite hard to do with generated code. cobra-cli would need to actually parse generated Go code and append lines at specific locations for that to work with sub commands that are added afterwards.That's way too much work so I did go a slightly easier way.
Might not be the final stage but definitely a step forward.