Skip to content
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

Adding ability to add nested commands through cobra add #273

Closed
wants to merge 10 commits into from
Closed

Adding ability to add nested commands through cobra add #273

wants to merge 10 commits into from

Conversation

ianwalter
Copy link
Contributor

  • Modified cobra add command to be able to parse argument into nested command structure (Ability to add nested commands through cobra add #266)
  • Modified createCmdFile function to accept cmdPath
  • Modified cmdFile template to specify package name, import it's child package if necessary, and to TitleCase command names so that they can be accessed by parent packages
  • Added getChildNames helper function so that child commands can be added to their parent
  • Simplified writeTemplateToFile function syntax.

Ian Walter added 8 commits April 27, 2016 22:44
* Modified `cobra add` command to be able to parse argument into nested command structure
* Modified `createCmdFile` function to accept cmdPath
* Modified cmdFile template to specify package name and to TitleCase
  command names so that they can be accessed by child packages.
* Simplified `writeTemplateToFile` function so that just the file path
  is passed instead of base path and filename.
@ianwalter
Copy link
Contributor Author

Not sure why this is failing with go 1.3.3 all of a sudden but it also failed in #271 so I don't think it is specific to my changes!

@mattstratton
Copy link

Any idea when this will be merged? I think it's exactly what I need for a project right now...

@jmdots
Copy link

jmdots commented Jan 20, 2017

I need this too :). Looks dormant.

@mattstratton
Copy link

Any thoughts on when this might be merged?

@n10v
Copy link
Collaborator

n10v commented Apr 10, 2017

@eparis

@eparis
Copy link
Collaborator

eparis commented Apr 10, 2017

I'll leave it for @spf13 I've never even looked at the code under cmd/

@n10v n10v added area/cobra-command Core `cobra.Command` implementations kind/feature A feature request for cobra; new or enhanced behavior labels May 5, 2017
@ianwalter ianwalter closed this Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cobra-command Core `cobra.Command` implementations kind/feature A feature request for cobra; new or enhanced behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants