cli/command: don't use pflags.XXXVarP for flags without shorthand
Use the `XXXVar` equivalent for flags that don't have a shorthand flag instead of passing an empty string for the shorthand flag. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -20,7 +20,7 @@ func equalCIDR(c1 net.IPNet, c2 net.IPNet) bool {
|
||||
|
||||
func setUpIPNetFlagSet(ipsp *[]net.IPNet) *pflag.FlagSet {
|
||||
f := pflag.NewFlagSet("test", pflag.ContinueOnError)
|
||||
f.VarP(newIPNetSliceValue([]net.IPNet{}, ipsp), "cidrs", "", "Command separated list!")
|
||||
f.Var(newIPNetSliceValue([]net.IPNet{}, ipsp), "cidrs", "Command separated list!")
|
||||
return f
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user