diff options
Diffstat (limited to 'internal/app/app_linux.go')
| -rw-r--r-- | internal/app/app_linux.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/app/app_linux.go b/internal/app/app_linux.go index 1563f99d..bdfc9eaf 100644 --- a/internal/app/app_linux.go +++ b/internal/app/app_linux.go @@ -3,6 +3,7 @@ package app import ( "context" "fmt" + "log" "sync" "hakurei.app/hst" @@ -22,6 +23,14 @@ func New(ctx context.Context, os sys.State) (App, error) { return a, err } +func MustNew(ctx context.Context, os sys.State) App { + a, err := New(ctx, os) + if err != nil { + log.Fatalf("cannot create app: %v", err) + } + return a +} + type app struct { id *stringPair[state.ID] sys sys.State |
