All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m1s
Test / Hakurei (push) Successful in 3m13s
Test / Hpkg (push) Successful in 3m55s
Test / Sandbox (race detector) (push) Successful in 4m33s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Flake checks (push) Successful in 1m36s
This further cleans up the package for the restructure. Signed-off-by: Ophestra <cat@gensokyo.uk>
23 lines
430 B
Go
23 lines
430 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, seal *Outcome) (*system.I, *container.Params) {
|
|
if a.outcome != seal || a.id != seal.id {
|
|
panic("broken app/outcome link")
|
|
}
|
|
return seal.sys, seal.container
|
|
}
|