aboutsummaryrefslogtreecommitdiff
path: root/cmd
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 /cmd
parent305446abfd66e85fe2c46cb4a07a3abb9fa809a4 (diff)
Misc idiomatic fixes
Diffstat (limited to 'cmd')
-rw-r--r--cmd/aerc/main.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/cmd/aerc/main.go b/cmd/aerc/main.go
index 845d176..9188dce 100644
--- a/cmd/aerc/main.go
+++ b/cmd/aerc/main.go
@@ -10,17 +10,14 @@ import (
)
func main() {
- var (
- conf *config.AercConfig
- err error
- )
- if conf, err = config.LoadConfig(nil); err != nil {
+ conf, err := config.LoadConfig(nil)
+ if err != nil {
panic(err)
}
- workers := make([]worker.Worker, 0)
+ var workers []worker.Worker
for _, account := range conf.Accounts {
- var work worker.Worker
- if work, err = worker.NewWorker(account.Source); err != nil {
+ work, err := worker.NewWorker(account.Source)
+ if err != nil {
panic(err)
}
fmt.Printf("Initializing worker %s\n", account.Name)