cleanup code warnings, update RaspberryPi readme

This commit is contained in:
Christoph Haas
2022-11-11 18:17:38 +01:00
parent bda8c9a3d1
commit 51fb9b4139
10 changed files with 34 additions and 31 deletions

View File

@@ -3,7 +3,6 @@ package common
import (
"crypto/tls"
"io"
"io/ioutil"
"time"
"github.com/pkg/errors"
@@ -96,7 +95,7 @@ func SendEmailWithAttachments(cfg MailConfig, sender, replyTo, subject, body, ht
email.AddAlternative(mail.TextPlain, body)
for _, attachment := range attachments {
attachmentData, err := ioutil.ReadAll(attachment.Data)
attachmentData, err := io.ReadAll(attachment.Data)
if err != nil {
return errors.Wrapf(err, "failed to read attachment data for %s", attachment.Name)
}