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

Reddit improvement proposal - nestest structs #3

Open
fred1268 opened this issue May 1, 2023 · 1 comment
Open

Reddit improvement proposal - nestest structs #3

fred1268 opened this issue May 1, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@fred1268
Copy link
Owner

fred1268 commented May 1, 2023

It'd be neat if you could handle nested structs to control for flow e.g.

type Command struct{
Foo *struct{
Bar ,-b, mandatory
} clap:"foo"
Biz *struct{
Bar ,-b
} clap:"biz"
}

go run main.go foo -b "because bar is required"

go run main.go biz

That being said there's nothing here that prevents the user from doing that themselves

@fred1268 fred1268 self-assigned this May 1, 2023
@fred1268 fred1268 added the enhancement New feature or request label May 6, 2023
@gedw99
Copy link

gedw99 commented May 20, 2023

Oh this would be awesome ! Really like clap

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

No branches or pull requests

2 participants