~geb/sup

e5f98d2ea501267213f2cedf9d4d301aabe9bdb7 — John Gebbie 1 year, 11 months ago 8e52766
run()
1 files changed, 7 insertions(+), 4 deletions(-)

M main.go
M main.go => main.go +7 -4
@@ 691,14 691,17 @@ func Login() *mautrix.Client {
	return client
}

func run() int {
	client := Login()
	defer client.Logout()
	return NewApp(client).Run()
}

func main() {
	if len(os.Args) > 1 {
		fmt.Println("Usage: sup\nSee the manpage for a tutorial.")
		os.Exit(0)
	}

	client := Login()
	defer client.Logout()
	app := NewApp(client)
	os.Exit(app.Run())
	os.Exit(run())
}