Skip to content

Conversation

jllovet
Copy link
Contributor

@jllovet jllovet commented Aug 9, 2025

What type of PR is this?

  • Documentation

What this PR does / why we need it:

The documentation was missing a section on Flag Groups.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

I have an additional proposal for a feature based on behavior that I found while building the example for this that I would like to talk about.

Testing

Save the example to a file called main.go.

Run:

go run main.go

Want the following, mod the date:

NAME:
   authors - A new cli application

USAGE:
   authors

OPTIONS:
   --help, -h      show help
   --login string  the username of the user
   --id string     the user id (defaults to 'me' for current user)
2025/08/08 23:09:13 one of these flags needs to be provided: login, id

Run:

go run main.go --id 987zyx

Want:

Getting user by id: 987zyx
{"id":"987zyx","login":"vwoolf@example.com","firstName":"Virginia","lastName":"Woolf"}

Run:

go run main.go --login example@example.com

Want:

Getting user by login: example@example.com
{"id":"abc123","login":"example@example.com","firstName":"Virginia","lastName":"Woolf"}

Release Notes

Documentation additions on flag groups

@jllovet jllovet requested a review from a team as a code owner August 9, 2025 03:12
@dearchap dearchap merged commit 32d2668 into urfave:main Aug 9, 2025
9 checks passed
@jllovet
Copy link
Contributor Author

jllovet commented Aug 11, 2025

@dearchap, I went to the docs today, but I didn't see the additions from this PR reflected there. Anything else needed from my side to get these promoted to the docs? Or are they built manually and that just hasn't been done yet?

https://cli.urfave.org/v3/examples/flags/advanced/

@dearchap
Copy link
Contributor

The docs are pushed when a new release tag is created. I'll do that later today. Nothing needed from your side. Thank you so much for the PR @jllovet

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

Successfully merging this pull request may close these issues.

3 participants