mirror of
https://github.com/golang/go
synced 2024-11-21 23:34:42 -07:00
Wrong sense on this error
This commit is contained in:
parent
4bc6a36ae9
commit
f7be4ea7d9
@ -757,7 +757,7 @@ func (p *addrParser) consumeDomainLiteral() (string, error) {
|
|||||||
return "", fmt.Errorf("mail: invalid IPv6 address in domain-literal: %q", dtext)
|
return "", fmt.Errorf("mail: invalid IPv6 address in domain-literal: %q", dtext)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if net.ParseIP(dtext).To4() != nil {
|
} else if net.ParseIP(dtext).To4() == nil {
|
||||||
return "", fmt.Errorf("mail: invalid IP address in domain-literal: %q", dtext)
|
return "", fmt.Errorf("mail: invalid IP address in domain-literal: %q", dtext)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user