summary refs log tree commit diff stats
path: root/worker
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-10 17:19:45 +0100
committerDrew DeVault <ddevault@vistarmedia.com>2018-01-10 11:20:41 -0500
commita0be5e80256b98237241b2f3d7825484e7a9c964 (patch)
tree8387b8abc2ad9a81c1ced0d1caa50be7b987e193 /worker
parent305446abfd66e85fe2c46cb4a07a3abb9fa809a4 (diff)
downloadaerc-a0be5e80256b98237241b2f3d7825484e7a9c964.tar.gz
Misc idiomatic fixes
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/worker.go10
-rw-r--r--worker/worker.go7
2 files changed, 7 insertions, 10 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 7525da5..6ffdf3a 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -1,10 +1,10 @@
 package imap
 
 import (
-	"git.sr.ht/~sircmpwn/aerc2/worker/types"
-
 	"fmt"
 	"time"
+
+	"git.sr.ht/~sircmpwn/aerc2/worker/types"
 )
 
 type IMAPWorker struct {
@@ -32,15 +32,15 @@ func (w *IMAPWorker) PostAction(msg types.WorkerMessage) {
 	w.actions <- msg
 }
 
-func (w *IMAPWorker) handleMessage(_msg types.WorkerMessage) {
-	switch msg := _msg.(type) {
+func (w *IMAPWorker) handleMessage(msg types.WorkerMessage) {
+	switch msg := msg.(type) {
 	case types.Ping:
 		w.messages <- types.Ack{
 			Message: types.RespondTo(msg),
 		}
 	default:
 		w.messages <- types.Unsupported{
-			Message: types.RespondTo(_msg),
+			Message: types.RespondTo(msg),
 		}
 	}
 }
diff --git a/worker/worker.go b/worker/worker.go
index a504790..da7928e 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -16,11 +16,8 @@ type Worker interface {
 
 // Guesses the appropriate worker type based on the given source string
 func NewWorker(source string) (Worker, error) {
-	var (
-		u   *url.URL
-		err error
-	)
-	if u, err = url.Parse(source); err != nil {
+	u, err := url.Parse(source)
+	if err != nil {
 		return nil, err
 	}
 	switch u.Scheme {
c8cf8c8caed6b62919a680ed907c9a'>5763322b ^
34514ae8 ^
f898ee7a ^
f0cf7af7 ^


34514ae8 ^

f0cf7af7 ^


c912b731 ^
5763322b ^


f0f16bdf ^
f0cf7af7 ^
5763322b ^
f0cf7af7 ^
53172ce1 ^
34514ae8 ^
f0cf7af7 ^
c912b731 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46