forked from security/hakurei
internal/app: remove app interface
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>
This commit is contained in:
@@ -7,17 +7,16 @@ import (
|
||||
"hakurei.app/system"
|
||||
)
|
||||
|
||||
func NewWithID(id state.ID, os sys.State) App {
|
||||
a := new(app)
|
||||
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)
|
||||
func AppIParams(a *App, sa SealedApp) (*system.I, *container.Params) {
|
||||
seal := sa.(*outcome)
|
||||
if v.outcome != seal || v.id != seal.id {
|
||||
if a.outcome != seal || a.id != seal.id {
|
||||
panic("broken app/outcome link")
|
||||
}
|
||||
return seal.sys, seal.container
|
||||
|
||||
Reference in New Issue
Block a user