App struct and methods moved to app.go.

This commit is contained in:
Benjamin Arntzen (aider)
2024-06-27 05:52:01 +01:00
parent dd2676c72a
commit 24c2e4a37f
2 changed files with 3 additions and 17 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
package main
package app
import (
"context"
+2 -16
View File
@@ -7,24 +7,10 @@ import (
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"./app"
// App struct and methods moved to app.go
import "yourproject/app"
)
// App struct
type App struct {
ctx context.Context
}
// NewApp creates a new App application struct
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