fred1268 / go-clap

Lightweight, non intrusive Command Line Argument Parser
MIT License
64 stars 3 forks source link

Reddit improvement proposal - nestest structs #3

Open fred1268 opened 1 year ago

fred1268 commented 1 year ago

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

gedw99 commented 1 year ago

Oh this would be awesome ! Really like clap