mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
apps: drop init funcs
Now that Gio runs main functions everywhere, init func are no longer necessary. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-6
@@ -20,18 +20,13 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
app.Main()
|
||||
}
|
||||
|
||||
// On iOS and Android main will never be called, so
|
||||
// setting up the window must run in an init function.
|
||||
func init() {
|
||||
go func() {
|
||||
w := app.NewWindow(nil)
|
||||
if err := loop(w); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}()
|
||||
app.Main()
|
||||
}
|
||||
|
||||
func loop(w *app.Window) error {
|
||||
|
||||
Reference in New Issue
Block a user