diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-24 18:44:14 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-24 18:44:14 +0900 |
| commit | 1c4f593566943d8a0ce16eb3cae77f8c50238202 (patch) | |
| tree | 2ac5c41a84127ff4cd5a275c81e834c495a109c9 /internal/app/export_test.go | |
| parent | b99c63337df4068b36d7d8de2ae79fd274172977 (diff) | |
internal/app: unexport outcome, remove app struct
The App struct no longer does anything, and the outcome struct is entirely opaque.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/export_test.go')
| -rw-r--r-- | internal/app/export_test.go | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/internal/app/export_test.go b/internal/app/export_test.go index 3e5db9fb..1bfba48a 100644 --- a/internal/app/export_test.go +++ b/internal/app/export_test.go @@ -4,18 +4,13 @@ import ( "context" "hakurei.app/container" + "hakurei.app/hst" "hakurei.app/internal/app/state" "hakurei.app/internal/sys" "hakurei.app/system" ) -func NewWithID(ctx context.Context, id state.ID, os sys.State) *App { - return &App{id: newID(&id), sys: os, ctx: ctx} -} - -func AppIParams(a *App, seal *Outcome) (*system.I, *container.Params) { - if a.outcome != seal || a.id != seal.id { - panic("broken app/outcome link") - } - return seal.sys, seal.container +func FinaliseIParams(ctx context.Context, k sys.State, config *hst.Config, id *state.ID) (*system.I, *container.Params, error) { + seal := outcome{id: &stringPair[state.ID]{*id, id.String()}} + return seal.sys, seal.container, seal.finalise(ctx, k, config) } |
