jessevdk/go-flags — pull request #49 by laurent22 (2013-12-12 06:15:46+00:00)
Title: Check for duplicate flags.

Currently, if someone accidentally defines the same flag twice, there is no error and it is not obvious from the behavior of the library that there is a problem. In my case, I've defined a new `-v --variables` (String slice) flag when there was already a `-v --verbose` flag. As a result the resulting string slice had all the options + an extra `v` at the beginning of the slice.

This pull request checks that the short and long flag of each option has not been defined before adding it to the group. It returns an ErrDuplicatedFlag in case of error.

Please let me know what you think. I'd be glad to add unit tests for the feature if needed.