diff --git a/example/gophers/main.go b/example/gophers/main.go index dc233279..8cd3c9f0 100644 --- a/example/gophers/main.go +++ b/example/gophers/main.go @@ -60,10 +60,10 @@ func main() { app.Size(unit.Dp(400), unit.Dp(800)), app.Title("Gophers"), ) - defer os.Exit(0) if err := newApp(w).run(); err != nil { log.Fatal(err) } + os.Exit(0) }() app.Main() } diff --git a/example/hello/hello.go b/example/hello/hello.go index 82f403d9..ec8dfe00 100644 --- a/example/hello/hello.go +++ b/example/hello/hello.go @@ -21,11 +21,11 @@ import ( func main() { go func() { - defer os.Exit(0) w := app.NewWindow() if err := loop(w); err != nil { log.Fatal(err) } + os.Exit(0) }() app.Main() } diff --git a/example/kitchen/kitchen.go b/example/kitchen/kitchen.go index 293888a9..af0b4973 100644 --- a/example/kitchen/kitchen.go +++ b/example/kitchen/kitchen.go @@ -68,11 +68,11 @@ func main() { }() go func() { - defer os.Exit(0) w := app.NewWindow(app.Size(unit.Dp(800), unit.Dp(700))) if err := loop(w); err != nil { log.Fatal(err) } + os.Exit(0) }() app.Main() }