aboutsummaryrefslogtreecommitdiff
path: root/cmd/aerc/main.go
blob: 2627a71417fefcaf14a355b004c387f8909319b0 (plain)
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
package main

import (
	"fmt"

	"git.sr.ht/~sircmpwn/aerc2/config"
	"git.sr.ht/~sircmpwn/aerc2/worker"
	"git.sr.ht/~sircmpwn/aerc2/worker/types"
)

func main() {
	var (
		c   *config.AercConfig
		err error
	)
	if c, err = config.LoadConfig(nil); err != nil {
		panic(err)
	}
	fmt.Printf("%+v\n", *c)
	w := worker.NewWorker("")
	go w.Run()
	w.PostAction(types.Ping{})
	for {
		if msg := w.GetMessage(); msg != nil {
			fmt.Printf("<- %T: %v\n", msg, msg)
		}
	}
}