All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m6s
Test / Hakurei (push) Successful in 3m21s
Test / Hpkg (push) Successful in 3m47s
Test / Sandbox (race detector) (push) Successful in 4m22s
Test / Hakurei (race detector) (push) Successful in 5m16s
Test / Flake checks (push) Successful in 1m36s
It is very clear at this point that there will not be multiple implementations of App, and the internal/app package will never move out of internal due to hsu. Signed-off-by: Ophestra <cat@gensokyo.uk>
24 lines
452 B
Go
24 lines
452 B
Go
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) {
|
|
seal := sa.(*outcome)
|
|
if a.outcome != seal || a.id != seal.id {
|
|
panic("broken app/outcome link")
|
|
}
|
|
return seal.sys, seal.container
|
|
}
|