diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-07-03 04:11:38 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-07-03 04:36:59 +0900 |
| commit | 087959e81bcd52104676ccacedd605e6491b4376 (patch) | |
| tree | 11cd6eccbfd9278f6c99d33191b320bb4e728888 /internal/app/export_linux_test.go | |
| parent | e6967b8bbb5ceec3abbd002f52cff1167a969e9e (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/export_linux_test.go')
| -rw-r--r-- | internal/app/export_linux_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
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 +} |
