go-clap
go-clap copied to clipboard
Reddit improvement proposal - nestest structs
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