Hi all!
I have two questions, the first is more Cobra-related (I didn'f find a cobra google group) and the second more general:
First question:
--------------------
* I have (for example) two subcommands A and B and the A subcommand include some functions and the function called by B
* Thus A and B need to share some flags
* I can't attach the same flags to two different subcommands otherwise my program will crash with `panic: <B> flag redefined: <flag name>
I can agree that using the same flag with different meanings in different context can be confusing, but the same flag with the same meaning
shouldn't be a problem. Moreover, now I have to put the flags as persistent and attach them to the root command and I
don't think this is a great solution because I am linking flags with a command (the root one) that doesn't need them.
Is there a better solution?
Second question:
-------------------------
Why is not possible to check for redefined flags at compile time (given that they are written in the source) instead of crash
at run time?
thanks a lot
brunetto