From f7be4ea7d99c70fa9d256d4a9d63950c89114132 Mon Sep 17 00:00:00 2001 From: Cassondra Foesch Date: Thu, 19 Sep 2024 17:35:28 +0000 Subject: [PATCH] Wrong sense on this error --- src/net/mail/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/mail/message.go b/src/net/mail/message.go index 5679e348f89..c83b59baa1f 100644 --- a/src/net/mail/message.go +++ b/src/net/mail/message.go @@ -757,7 +757,7 @@ func (p *addrParser) consumeDomainLiteral() (string, error) { 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) }