gofr
gofr copied to clipboard
Add `-h` or `--help` for `gofr.NewCMD()`
List sub commands if ./cli -h
invoked.
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.
Quite interesting! I want to work on it.
@IvanGael any updates on this? Please let us know if you are facing any issues :)
@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!
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
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.
Thank you for the clarification. I'll try to look into that and get back to you shortly if I have any further questions.
Can I try to work on it as well?
@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 ?
@IvanGael any updates? Anywhere I could help you?
@vipul-rawat and @aryanmehrotra Can I work on this issue?
@vipul-rawat I just created a pull request. Try to review it.
@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
@vipul-rawat I just added new commit
Hi @IvanGael, I have also made an implementation of helper command. Can we discuss once on my implementation if possible?