client io architecture

This commit is contained in:
Ilia Denisov
2026-03-12 18:45:46 +02:00
committed by GitHub
parent 2dafa69b93
commit 079b9facb0
36 changed files with 1810 additions and 460 deletions
+38
View File
@@ -0,0 +1,38 @@
package main
import (
"context"
"errors"
"fmt"
"galaxy/loader"
"os"
"os/signal"
"fyne.io/fyne/v2/app"
)
func main() {
var err error
defer func() {
if err == nil {
if r := recover(); r != nil {
err = errors.Join(err, fmt.Errorf("app panics: %v", r))
}
}
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}()
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel()
app := app.New()
l, err := loader.NewLoader(app, nil)
if err != nil {
return
}
err = l.Run(ctx)
}