From 1c4f593566943d8a0ce16eb3cae77f8c50238202 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 24 Sep 2025 18:44:14 +0900 Subject: 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 --- internal/app/export_test.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'internal/app/export_test.go') 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) } -- cgit v1.3.1