From 3e28bfe71719645afd718791a9e8b4060e58072d Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 19 Jul 2021 23:08:00 +1000 Subject: [PATCH] [v2] [broken - WIP] Update vanilla template --- .../initialise/templates/templates/vanilla/app.tmpl.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/app.tmpl.go b/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/app.tmpl.go index 9c5ff006..3675fa0b 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/app.tmpl.go +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/app.tmpl.go @@ -1,14 +1,13 @@ package main import ( + "context" "fmt" - - "github.com/wailsapp/wails/v2" ) // App struct type App struct { - runtime *wails.Runtime + ctx context.Context } // NewApp creates a new App application struct @@ -17,9 +16,9 @@ func NewApp() *App { } // startup is called at application startup -func (b *App) startup(runtime *wails.Runtime) { +func (b *App) startup(ctx context.Context) { // Perform your setup here - b.runtime = runtime + b.ctx = ctx } // shutdown is called at application termination