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

Improve folder layout for cobra generator #201

Closed
labkode opened this issue Nov 30, 2015 · 3 comments
Closed

Improve folder layout for cobra generator #201

labkode opened this issue Nov 30, 2015 · 3 comments
Labels
area/cobra-command Core `cobra.Command` implementations kind/feature A feature request for cobra; new or enhanced behavior

Comments

@labkode
Copy link

labkode commented Nov 30, 2015

It would be good to let the cobra generator to create subfolders under cmd if the added command is not a child of RootCmd. This leads to clear code organisation.

I have the commands
appName upload
appName benchmark upload

and with cobra they go to the same file: upload.go

A good approach would be:
cmd/upload.go
cmd/benchmark.go
cmd/benchmark/upload.go

BTW, thanks for such valuable tool!

@spf13 spf13 added the kind/feature A feature request for cobra; new or enhanced behavior label Dec 24, 2015
@spf13
Copy link
Owner

spf13 commented Dec 24, 2015

I like this idea a lot. Please contribute :) It would be a small but welcome change.

@spf13
Copy link
Owner

spf13 commented Apr 27, 2016

see #266

@n10v n10v added the area/cobra-command Core `cobra.Command` implementations label Apr 20, 2017
@n10v
Copy link
Collaborator

n10v commented May 5, 2017

Main discussion in #266.

@n10v n10v closed this as completed May 5, 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

No branches or pull requests

3 participants