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:
2025-08-28 00:54:44 +09:00
parent da0459aca1
commit d0b6852cd7
3 changed files with 14 additions and 26 deletions

View File

@@ -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