All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m6s
Test / Hakurei (push) Successful in 3m19s
Test / Hpkg (push) Successful in 3m54s
Test / Sandbox (race detector) (push) Successful in 4m17s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Flake checks (push) Successful in 1m39s
The mutex is not really doing anything, none of these methods make sense when called concurrently anyway. The copylocks analysis is still satisfied by the noCopy struct. Signed-off-by: Ophestra <cat@gensokyo.uk>
22 lines
455 B
Go
22 lines
455 B
Go
package app
|
|
|
|
import (
|
|
"context"
|
|
|
|
"hakurei.app/container"
|
|
"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
|
|
}
|