-
Couldn't load subscription status.
- Fork 1.8k
Closed
Labels
kind/bugdescribes or fixes a bugdescribes or fixes a bug
Description
Hello,
I define my flag as follow:
flFilter = cli.StringSliceFlag{
Name: "filter",
Value: &cli.StringSlice{"flag1", "flag2", "flag3"},
}If I start my binary without arguments, c.StringSlice("filter") returns ["flag1", "flag2", "flag3"] as expected.
If I start my binary with --filter flag4, c.StringSlice("filter") returns ["flag1", "flag2", "flag3", "flag4"]. I find this behaviour odd, I expected it to erase the default value.
Even worst, if I start my binary with --filter flag1, c.StringSlice("filter") returns ["flag1", "flag2", "flag3", "flag1"].
Is this the expected behavior ? I know I have 3 default value so I can do c.StringSlice("filter")[3:] if set, but still it's not perfect.
Metadata
Metadata
Assignees
Labels
kind/bugdescribes or fixes a bugdescribes or fixes a bug