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

Add -h or --help for gofr.NewCMD() #568

Open
linux-china opened this issue May 6, 2024 · 15 comments
Open

Add -h or --help for gofr.NewCMD() #568

linux-china opened this issue May 6, 2024 · 15 comments
Assignees
Labels
CMD/CLI Issues related to gofr cmd apps and cli applications good first issue Good for newcomers

Comments

@linux-china
Copy link

List sub commands if ./cli -h invoked.

@vipul-rawat vipul-rawat added the good first issue Good for newcomers label May 6, 2024
@vipul-rawat
Copy link
Contributor

we can also print their functionality along with the subcommands when -h or --help is invoked. Need to have a way to add helper/description strings to the sub-commands.

@vipul-rawat vipul-rawat added the CMD/CLI Issues related to gofr cmd apps and cli applications label May 7, 2024
@IvanGael
Copy link

IvanGael commented May 7, 2024

Quite interesting! I want to work on it.

@vipul-rawat
Copy link
Contributor

@IvanGael any updates on this? Please let us know if you are facing any issues :)

@IvanGael
Copy link

@vipul-rawat In fact, I try to understand the general structure of the code and the project to know exactly where I need to integrate this feature. If you could tell me the files that are affected by this feature, that would help me a lot. THANKS!

@vipul-rawat
Copy link
Contributor

So for gofr applications, we have tried to generalise the request/response structure for our applications. So command line applications also fall under the same. So it is important to understand the Request and Responder interface.
The files concerning the feature would pe pkg/gofr/gofr.com, pkg/gofr/cmd.go

@vipul-rawat
Copy link
Contributor

We would like to have a default command added to the cmd applications that would list out all the routes that are registered with the cmd applications, we can also print out them when an unknown sub-command is executed.

@IvanGael
Copy link

Thank you for the clarification.
I'll try to look into that and get back to you shortly if I have any further questions.

@KedarisettiSreeVamsi
Copy link

Can I try to work on it as well?

@IvanGael
Copy link

@KedarisettiSreeVamsi I'm already working on this issue so I think it would be wiser to work on another issue. I think currently another issues are open! @vipul-rawat what do you think about it ?

@vipul-rawat
Copy link
Contributor

@IvanGael any updates? Anywhere I could help you?

@KedarisettiSreeVamsi
Copy link

@vipul-rawat and @aryanmehrotra Can I work on this issue?

@IvanGael
Copy link

@vipul-rawat I just created a pull request. Try to review it.

@vipul-rawat
Copy link
Contributor

@vipul-rawat and @aryanmehrotra Can I work on this issue?

Hey @KedarisettiSreeVamsi IvanGael is already working on the same, you can provide feedbacks and suggestions on the work done in PR #661

IvanGael added a commit to IvanGael/gofr that referenced this issue May 28, 2024
@IvanGael
Copy link

@vipul-rawat I just added new commit

@KedarisettiSreeVamsi
Copy link

Hi @IvanGael, I have also made an implementation of helper command. Can we discuss once on my implementation if possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMD/CLI Issues related to gofr cmd apps and cli applications good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants