-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Labels
area/v3relates to / is being considered for v3relates to / is being considered for v3help wantedplease help if you can!please help if you can!status/claimedsomeone has claimed this issuesomeone has claimed this issuestatus/confirmedconfirmed to be valid, but work has yet to startconfirmed to be valid, but work has yet to start
Milestone
Description
Checklist
- [y] Are you running the latest v2 release? The list of releases is here.
- [y] Did you check the manual for your release? The v2 manual is here
- [y] Did you perform a search about this feature? Here's the Github guide about searching.
What problem does this solve?
Sometimes users can accidently duplicate string type flags and then the latest value we be taken. It is not clear and bad for usability.
Solution description
Add an option called Duplicated true\false to flag options. Example:
flagFoo = &cli.StringFlag{
Name: "foo",
Duplicated: false,
}
A detailed description of what you want to happen.
if Duplicated set to false command should fail with error
"flag foo can not be duplicated"
Describe alternatives you've considered
For now, as a workaround, we're using StringSliceType for flags we don't want to be duplicated and check that slice have only one element in it.
coilysiren
Metadata
Metadata
Assignees
Labels
area/v3relates to / is being considered for v3relates to / is being considered for v3help wantedplease help if you can!please help if you can!status/claimedsomeone has claimed this issuesomeone has claimed this issuestatus/confirmedconfirmed to be valid, but work has yet to startconfirmed to be valid, but work has yet to start