You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add optional check for duplicated string and int type flags. #1071
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.
changed the title [-]v2 feature: Add optional check for duplicated string and int type flags.[/-][+]Add optional check for duplicated string and int type flags.[/+]on Apr 22, 2022
@arykalin Looking at your code you've defined "instance" as a stringslice flag and then enforced that if should not be length > 1 . Is this because if you've defined instance as a string flag and then people use the flag twice like --instance id1 and --instance id2 and then only the last value is taken. That is what you would like to guard against. ?
Activity
coilysiren commentedon Feb 26, 2020
Oh wow that sucks 😅we should definitely fix this 👍although possibly only in v3? Because I'm not sure if it would be considered a "breaking change"
stale commentedon May 26, 2020
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.
stale commentedon Jun 25, 2020
Closing this as it has become stale.
[-]v2 feature: Add optional check for duplicated string and int type flags.[/-][+]Add optional check for duplicated string and int type flags.[/+]dearchap commentedon Oct 21, 2022
Will consider for v3
dearchap commentedon Nov 28, 2022
@arykalin If I understand correctly you've defined 2 flags(same type) with same name and only the last defined one will pick up values ?
dearchap commentedon Dec 1, 2022
@arykalin Looking at your code you've defined "instance" as a stringslice flag and then enforced that if should not be length > 1 . Is this because if you've defined instance as a string flag and then people use the flag twice like --instance id1 and --instance id2 and then only the last value is taken. That is what you would like to guard against. ?