spf13/cobra

Flag special "mark" support

sagan opened this issue · 0 comments

For example, iptables flags support the "!" mark:

[!] -s, --source address[/mask][,...]
       Source specification. Address can be either a network name, a hostname, a network IP address (with /mask),
       or a plain IP address. ... A "!" argument before the address specification inverts the sense of the address.

e.g.:

! -s 192.168.1.0/24

The whole is interpreted as a flag, the "!" mark means negation of the condition.

Is it possible to add similar feature to cobra ?