New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StringSlice flags set to default Value #1131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test to demonstrate the impact of this change?
I have added a test. The idea is that if the destination is set and the value is set but the flag is not set by env name or a program argument the value sets the destination. This is more consistent with how the other flags work (for instance StringFlag) |
It looks like this is a duplicate of #1127? |
It does look like this is a duplicate! |
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
Closing this as it has become stale. |
Confirmed already fixed via #1127 Thank you all the same @darren-west! |
StringSliceFlag types do not set the destination to the value if no env/arg is set.
For example if the argument
--arg
is not set and env variableARG
is not set you would expect the destination to be set tocli.NewStringSlice("foo")
I have quickly looked at how the string flag achieves this and tried to do similar.