-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support slice flag inputs with commas #45
Comments
The |
I think we could keep the default comma parsing behavior here while adding a new string slice flag type that takes commas directly without considering them a character to split input on. |
An alternative could be what the stdlib flag does, which is to define a Value interface with a |
Currently, slice flags are required to be specified multiple times. It could be helpful though to automatically parse commas in slice flag inputs into different values. Then again, it could make passing literal commas more confusing.
Should we support slice inputs like this:
./app -str one,two
which results in
[]string{"one","two"}
or should we continue to only support multiple flag uses like this:
./app -str one -str two
which results in the same
[string{"one","two"}
The text was updated successfully, but these errors were encountered: