cobra-cli
cobra-cli copied to clipboard
refactor generated command & subcommand boilerplate
- This is not my final image of how the commands should be constructed but my final image would require to work with the Go AST library which I am not familiar with and imo might be overkill.
- I usually do call
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.
@johnSchnake please review
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