From c6a08b1003a2cb02d86002541ead0f9b38db1beb Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Sat, 4 Mar 2023 10:56:46 +0100 Subject: 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 Signed-off-by: Robin Jarry --- aerc.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'aerc.go') diff --git a/aerc.go b/aerc.go index f4247ed5..49684c53 100644 --- a/aerc.go +++ b/aerc.go @@ -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 -- cgit