mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
make staticcheck happy
i don't think it's actually better, but it is helpful to keep the code base free of staticcheck findings.
This commit is contained in:
parent
9c5d234162
commit
96e3e5e33e
1 changed files with 4 additions and 8 deletions
|
@ -1687,22 +1687,18 @@ func (c *conn) isSMTPUTF8Required(part *message.Part) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check "MAIL FROM"
|
// Check "MAIL FROM".
|
||||||
if hasNonASCII(strings.NewReader(string(c.mailFrom.Localpart))) {
|
if hasNonASCII(strings.NewReader(string(c.mailFrom.Localpart))) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// Check all "RCPT TO"
|
// Check all "RCPT TO".
|
||||||
for _, rcpt := range c.recipients {
|
for _, rcpt := range c.recipients {
|
||||||
if hasNonASCII(strings.NewReader(string(rcpt.rcptTo.Localpart))) {
|
if hasNonASCII(strings.NewReader(string(rcpt.rcptTo.Localpart))) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check header in all message parts
|
// Check header in all message parts.
|
||||||
if hasNonASCIIPartHeader(part) {
|
return hasNonASCIIPartHeader(part)
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ../rfc/5321:1992 ../rfc/5321:1098
|
// ../rfc/5321:1992 ../rfc/5321:1098
|
||||||
|
|
Loading…
Reference in a new issue