From 087959e81bcd52104676ccacedd605e6491b4376 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 3 Jul 2025 04:11:38 +0900 Subject: app: remove split implementation It is completely nonsensical and highly error-prone to have multiple implementations of this in the same build. This should be switched at compile time instead therefore the split packages are pointless. Signed-off-by: Ophestra --- internal/app/export_linux_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 internal/app/export_linux_test.go (limited to 'internal/app/export_linux_test.go') diff --git a/internal/app/export_linux_test.go b/internal/app/export_linux_test.go new file mode 100644 index 00000000..73c9df9a --- /dev/null +++ b/internal/app/export_linux_test.go @@ -0,0 +1,24 @@ +package app + +import ( + "hakurei.app/container" + "hakurei.app/internal/app/state" + "hakurei.app/internal/sys" + "hakurei.app/system" +) + +func NewWithID(id state.ID, os sys.State) App { + a := new(app) + a.id = newID(&id) + a.sys = os + return a +} + +func AppIParams(a App, sa SealedApp) (*system.I, *container.Params) { + v := a.(*app) + seal := sa.(*outcome) + if v.outcome != seal || v.id != seal.id { + panic("broken app/outcome link") + } + return seal.sys, seal.container +} -- cgit v1.3.1