diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-29 02:33:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-29 06:11:47 +0900 |
| commit | 46cd3a28c83e93b5d66c52d06a8366c11910d5c0 (patch) | |
| tree | 6e25c5078b5cd9de78b7a6c9b253f1132358812b /internal/app/app.go | |
| parent | ad1bc6794f0053c3e63eab408a0d530d53e8b51c (diff) | |
container: remove global msg
This frees all container instances of side effects.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/app.go')
| -rw-r--r-- | internal/app/app.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/app/app.go b/internal/app/app.go index b5331568..c5a3e0f4 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -6,23 +6,24 @@ import ( "log" "os" + "hakurei.app/container" "hakurei.app/hst" "hakurei.app/internal/app/state" ) // Main runs an app according to [hst.Config] and terminates. Main does not return. -func Main(ctx context.Context, config *hst.Config) { +func Main(ctx context.Context, msg container.Msg, config *hst.Config) { var id state.ID if err := state.NewAppID(&id); err != nil { log.Fatal(err) } seal := outcome{id: &stringPair[state.ID]{id, id.String()}, syscallDispatcher: direct{}} - if err := seal.finalise(ctx, config); err != nil { + if err := seal.finalise(ctx, msg, config); err != nil { printMessageError("cannot seal app:", err) os.Exit(1) } - seal.main() + seal.main(msg) panic("unreachable") } |
