diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-28 00:45:57 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-28 00:45:57 +0900 |
| commit | da0459aca1988401c9e8743bedb349d6f8544aa3 (patch) | |
| tree | 7e5c3e74b4f8c145495a17f7922e90fdcb4a1add /internal/app/app_linux.go | |
| parent | 1be8de6f5ca4c7e40f5999ce4f960010fc36acb1 (diff) | |
internal/app: update doc comments
A lot of these comments are quite old and have not been updated to reflect changes.
Signed-off-by: Ophestra <cat@gensokyo.uk>
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 |
