diff options
author | Moritz Poldrack <git@moritz.sh> | 2023-03-04 10:56:46 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-03-07 00:12:55 +0100 |
commit | c6a08b1003a2cb02d86002541ead0f9b38db1beb (patch) | |
tree | 80dead95349d263b8bad20c17b6005b523367485 /aerc.go | |
parent | 4838efdb1d5a746432a30ef0b86b090aab52fa7a (diff) | |
download | aerc-c6a08b1003a2cb02d86002541ead0f9b38db1beb.tar.gz |
ipc: use an interface instead of a function list
Currently, every function has to be mapped to the according handler with
our god-object. To make adding new handlers require less changes, change
this mapping into an interface that is satisfied by *widgets.Aerc
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'aerc.go')
-rw-r--r-- | aerc.go | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -214,13 +214,11 @@ func main() { ui.EnableMouse() } - as, err := ipc.StartServer() + as, err := ipc.StartServer(aerc) if err != nil { log.Warnf("Failed to start Unix server: %v", err) } else { defer as.Close() - as.OnMailto = aerc.Mailto - as.OnMbox = aerc.Mbox } // set the aerc version so that we can use it in the template funcs |