From 4ce8130cdf46b4db46129caf17d51630f8147b0d Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Tue, 26 Jan 2021 11:09:17 +1100 Subject: [PATCH] Replace CreateApp with single Run() method --- v2/wails.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/v2/wails.go b/v2/wails.go index 5f8b5bde9..7c77753a0 100644 --- a/v2/wails.go +++ b/v2/wails.go @@ -14,7 +14,12 @@ type Runtime = runtime.Runtime // Store is an alias for the Store object type Store = runtime.Store -// CreateApp creates an application based on the given config -func CreateApp(options *options.App) (*app.App, error) { - return app.CreateApp(options) +// Run creates an application based on the given config and executes it +func Run(options *options.App) error { + app, err := app.CreateApp(options) + if err != nil { + return err + } + + return app.Run() }