From 70bfcfef42578079f211d87cddc49519ee3503dc Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Sun, 31 Jul 2022 15:15:27 +0200 Subject: 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 Acked-by: Robin Jarry --- worker/imap/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'worker/imap/worker.go') diff --git a/worker/imap/worker.go b/worker/imap/worker.go index 40debe64..6b6c9261 100644 --- a/worker/imap/worker.go +++ b/worker/imap/worker.go @@ -282,7 +282,7 @@ func (w *IMAPWorker) Run() { case msg := <-w.worker.Actions: msg = w.worker.ProcessAction(msg) - if err := w.handleMessage(msg); err == errUnsupported { + if err := w.handleMessage(msg); errors.Is(err, errUnsupported) { w.worker.PostMessage(&types.Unsupported{ Message: types.RespondTo(msg), }, nil) -- cgit