From dffa2621c16eee6edd1461e7c1c8b92db0f040d0 Mon Sep 17 00:00:00 2001 From: "Benjamin Arntzen (aider)" Date: Thu, 27 Jun 2024 05:47:15 +0100 Subject: [PATCH] Implemented startup method to save the application context. --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index f6b1f49..0506479 100644 --- a/main.go +++ b/main.go @@ -20,6 +20,12 @@ func NewApp() *App { return &App{} } +// startup is called when the app starts. The context is saved +// so we can call the runtime methods +func (a *App) startup(ctx context.Context) { + a.ctx = ctx +} + //go:embed frontend var assets embed.FS