Compare commits
No commits in common. "master" and "v1.0.1" have entirely different histories.
@ -39,7 +39,7 @@ func New() *Parser {
|
||||
|
||||
func (p *Parser) addArg(a *arg) error {
|
||||
for _, v := range p.args {
|
||||
if (a.sname != "" && v.sname == a.sname) || (a.lname != "" && v.lname == a.lname) {
|
||||
if v.sname == a.sname || v.lname == a.lname {
|
||||
return errors.New("option name dup")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user