You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PS this is of course built into the language itself, but could anything like this ever be supported in cobra so I don't have to roll a bunch of custom logic? For example maybe just some builtin cmd.ParameterSet() method that can be used to group PersistentFlags()/Flags() into parameter sets?
The text was updated successfully, but these errors were encountered:
I'd like to be able to define various dependent flags relative to each other.
To describe behaviour like:
But I want to do this declaratively in a terse readable way.
Powershell has supported this for like a decade with "Parameter Sets" which make this trivial: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parameter_sets?view=powershell-7.3.
In PS this is of course built into the language itself, but could anything like this ever be supported in cobra so I don't have to roll a bunch of custom logic? For example maybe just some builtin
cmd.ParameterSet()
method that can be used to groupPersistentFlags()
/Flags()
into parameter sets?The text was updated successfully, but these errors were encountered: