5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 00:09:56 +08:00

Replace CreateApp with single Run() method

This commit is contained in:
Lea Anthony 2021-01-26 11:09:17 +11:00
parent fe87463b78
commit 4ce8130cdf
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -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()
}