aboutsummaryrefslogtreecommitdiffstats
path: root/worker/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/worker.go b/worker/worker.go
index c8ec6222..b6658849 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -5,6 +5,7 @@ import (
"git.sr.ht/~sircmpwn/aerc2/worker/types"
"fmt"
+ "log"
"net/url"
)
@@ -15,7 +16,7 @@ type Worker interface {
}
// Guesses the appropriate worker type based on the given source string
-func NewWorker(source string) (Worker, error) {
+func NewWorker(source string, logger *log.Logger) (Worker, error) {
u, err := url.Parse(source)
if err != nil {
return nil, err
@@ -23,7 +24,7 @@ func NewWorker(source string) (Worker, error) {
switch u.Scheme {
case "imap":
case "imaps":
- return imap.NewIMAPWorker(), nil
+ return imap.NewIMAPWorker(logger), nil
}
return nil, fmt.Errorf("Unknown backend %s", u.Scheme)
}