Compare commits
2 Commits
5bb2198684
...
113f1a1945
Author | SHA1 | Date | |
---|---|---|---|
113f1a1945 | |||
6f460a33db |
@ -39,7 +39,7 @@ func New() *Parser {
|
|||||||
|
|
||||||
func (p *Parser) addArg(a *arg) error {
|
func (p *Parser) addArg(a *arg) error {
|
||||||
for _, v := range p.args {
|
for _, v := range p.args {
|
||||||
if v.sname == a.sname || v.lname == a.lname {
|
if (a.sname != "" && v.sname == a.sname) || (a.lname != "" && v.lname == a.lname) {
|
||||||
return errors.New("option name dup")
|
return errors.New("option name dup")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user