summary refs log tree commit diff stats
path: root/worker/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/worker/worker.go b/worker/worker.go
index 959c7df..29bb560 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -15,12 +15,7 @@ func NewWorker(source string, logger *log.Logger) (*types.Worker, error) {
 	if err != nil {
 		return nil, err
 	}
-	worker := &types.Worker{
-		Actions:   make(chan types.WorkerMessage, 50),
-		Callbacks: make(map[types.WorkerMessage]func(msg types.WorkerMessage)),
-		Messages:  make(chan types.WorkerMessage, 50),
-		Logger:    logger,
-	}
+	worker := types.NewWorker(logger)
 	switch u.Scheme {
 	case "imap":
 		fallthrough