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

flag: add support for sub-commands #5326

Closed
gopherbot opened this issue Apr 21, 2013 · 2 comments
Closed

flag: add support for sub-commands #5326

gopherbot opened this issue Apr 21, 2013 · 2 comments

Comments

@gopherbot
Copy link

by raul.san@sent.com:

When you have so much flags is better to separate it with sub-commands, being the first
flag such sub-command, just like is used in go command source code:
"http://golang.org/src/cmd/go/main.go"; using the Command struct.

It is ver useful so should be in the standard library; if the flag's library API want
not be changed, it could be added in flag/flagutil
@bradfitz
Copy link
Contributor

Comment 1:

Subcommands can be built using the flag package as-is.  Camlistore and other projects do
this already.
Let's not add more stuff to the flag package which can be done already easily.

Status changed to WorkingAsIntended.

@gopherbot
Copy link
Author

Comment 2 by raul.san@sent.com:

If there is a standard way to handle it, then could be built a tool to read the command
source where one want to generate the completion-data for a shell like bash or zsh.
https://groups.google.com/d/msg/golang-nuts/_5cc9SdVOS4/9exVlbM8D50J

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants