Fixes#1831
By moving the check for help group existence to "ExecuteC()" we no
longer need groups to be added before AddCommand() is called. This
provides more flexibility to developers and works better with the use
of "init()" for command creation.
Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
* Add tests for grouping commands
* Adds Additional Command section in help
Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
Co-authored-by: Marc Khouzam <marc.khouzam@gmail.com>
This change adds two features for dealing with flags:
- requiring flags be provided as a group (or not at all)
- requiring flags be mutually exclusive of each other
By utilizing the flag annotations we can mark which flag groups
a flag is a part of and during the parsing process we track which
ones we have seen or not.
A flag may be a part of multiple groups. The list of flags and the
type of group (required together or exclusive) make it a unique group.
Signed-off-by: John Schnake <jschnake@vmware.com>