subcommand structure help
keith6014 opened this issue · comments
keith6014 commented
So, I have something like this
var (
app=kingpin.New("cmd")
l = app.command("l")
le=l.Arg("e","E")
s = app.command("s")
se=s.Arg("e","E")
seE=s.Arg("n","number").Int()
)
My intention is to have something like this
cmd l production
cmd s production apple # s is the subcommand, production is an environment, target is apple
cmd s production apple 10 # s is the subcommand, production is an environment, target is apple with 10 objects
How can I setup a structure in kinpin for something like that?
Alec Thomas commented
You can't do that unfortunately. Variable arguments can't be interspersed with commands.
If you're feeling adventurous you could try Kong, which has a solution for this exact problem, among others.