Simplify error return to make golangci-lint happy

This commit is contained in:
Winni Neessen 2023-01-02 20:49:35 +01:00
parent 8463f8524a
commit b8ee25f014
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D

View file

@ -108,12 +108,8 @@ func (c *Client) Send(ml ...*Msg) error {
if len(errs) > 1 { if len(errs) > 1 {
re := &SendError{Reason: ErrAmbiguous} re := &SendError{Reason: ErrAmbiguous}
for i := range errs { for i := range errs {
for _, e := range errs[i].errlist { re.errlist = append(re.errlist, errs[i].errlist...)
re.errlist = append(re.errlist, e) re.rcpt = append(re.rcpt, errs[i].rcpt...)
}
for _, r := range errs[i].rcpt {
re.rcpt = append(re.rcpt, r)
}
} }
// We assume that the isTemp flage from the last error we received should be the // We assume that the isTemp flage from the last error we received should be the