All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m8s
Test / Hakurei (push) Successful in 2m59s
Test / Hpkg (push) Successful in 3m56s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m4s
Test / Flake checks (push) Successful in 1m21s
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
|
|
}
|