diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-07-31 15:15:27 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-08-04 21:58:04 +0200 |
commit | 70bfcfef42578079f211d87cddc49519ee3503dc (patch) | |
tree | ae35c38e3980c73af2b43be10fe8cc9ece4f3f9a /worker/imap/fetch.go | |
parent | 978d35d356e8752bdd272884df48a6289d88b40a (diff) | |
download | aerc-70bfcfef42578079f211d87cddc49519ee3503dc.tar.gz |
lint: work nicely with wrapped errors (errorlint)
Error wrapping as introduced in Go 1.13 adds some additional logic to
use for comparing errors and adding information to it.
Signed-off-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/imap/fetch.go')
-rw-r--r-- | worker/imap/fetch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/worker/imap/fetch.go b/worker/imap/fetch.go index 41269cbf..f21c6e91 100644 --- a/worker/imap/fetch.go +++ b/worker/imap/fetch.go @@ -118,13 +118,13 @@ func (imapw *IMAPWorker) handleFetchMessageBodyPart( } h, err := textproto.ReadHeader(bufio.NewReader(body)) if err != nil { - return fmt.Errorf("failed to read part header: %v", err) + return fmt.Errorf("failed to read part header: %w", err) } part, err := message.New(message.Header{Header: h}, _msg.GetBody(&partBodySection)) if err != nil { - return fmt.Errorf("failed to create message reader: %v", err) + return fmt.Errorf("failed to create message reader: %w", err) } imapw.worker.PostMessage(&types.MessageBodyPart{ |