mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 10:40:39 +01:00
Rename variable 'failed' to 'hasError' for clarity
Renamed the variable 'failed' to 'hasError' to better reflect its purpose and improve code readability. This change helps in understanding that the variable indicates the presence of an error rather than a generic failure.
This commit is contained in:
parent
8ee37abca2
commit
2e7156182a
1 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ func (c *Client) sendSingleMsg(message *Msg) error {
|
|||
}
|
||||
return retError
|
||||
}
|
||||
failed := false
|
||||
hasError := false
|
||||
rcptSendErr := &SendError{}
|
||||
rcptSendErr.errlist = make([]error, 0)
|
||||
rcptSendErr.rcpt = make([]string, 0)
|
||||
|
@ -77,10 +77,10 @@ func (c *Client) sendSingleMsg(message *Msg) error {
|
|||
rcptSendErr.errlist = append(rcptSendErr.errlist, err)
|
||||
rcptSendErr.rcpt = append(rcptSendErr.rcpt, rcpt)
|
||||
rcptSendErr.isTemp = isTempError(err)
|
||||
failed = true
|
||||
hasError = true
|
||||
}
|
||||
}
|
||||
if failed {
|
||||
if hasError {
|
||||
if resetSendErr := c.smtpClient.Reset(); resetSendErr != nil {
|
||||
rcptSendErr.errlist = append(rcptSendErr.errlist, resetSendErr)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue