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 FlagSet usage examples #36307

Open
obeyda opened this issue Dec 29, 2019 · 7 comments
Open

flag: add FlagSet usage examples #36307

obeyda opened this issue Dec 29, 2019 · 7 comments

Comments

@obeyda
Copy link
Contributor

@obeyda obeyda commented Dec 29, 2019

What did you expect to see?

Having some examples on the flag package's docs showing how to create subcommands with FlagSet.

What did you see instead?

There's only a package example and Value interface usage and none of them shows how to use FlagSet to create subcommands.

@mvdan mvdan changed the title docs(flag): FlagSet usage examples flag: FlagSet usage examples Dec 29, 2019
@mvdan
Copy link
Member

@mvdan mvdan commented Dec 29, 2019

The example for https://golang.org/pkg/flag/#Value does use a flagset, but I agree that it's not easy to find. Sending a CL.

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 29, 2019

Change https://golang.org/cl/212757 mentions this issue: flag: add a FlagSet example

@gopherbot
Copy link

@gopherbot gopherbot commented Dec 29, 2019

Change https://golang.org/cl/212599 mentions this issue: flag: add example for flagset

@cagedmantis cagedmantis changed the title flag: FlagSet usage examples flag: add FlagSet usage examples Dec 30, 2019
@cagedmantis cagedmantis added this to the Backlog milestone Dec 30, 2019
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Dec 30, 2019

/cc @robpike

@Codinee
Copy link

@Codinee Codinee commented Feb 27, 2020

I would like to work on coming up with examples for FlagSet commands usage.

@agnivade
Copy link
Contributor

@agnivade agnivade commented Feb 27, 2020

@Codinee - There is already an active CL for this.

@obeyda
Copy link
Contributor Author

@obeyda obeyda commented Oct 13, 2020

Any updates you can propose to this CL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants