Core App API
The app layer provides the CLI interface and dependency wiring.
App Struct
Section titled “App Struct”type App struct { Exec executor.Executor FS filesystem.FileSystem Config *config.Config Context *elcontext.Context KernelBuilder *builder.KernelBuilder ModuleBuilder *builder.ModuleBuilder AppBuilder *builder.AppBuilder QEMURunner *emulator.QEMURunner HealthChecker *doctor.HealthChecker AutoFixer *doctor.AutoFixer RootfsCreator *rootfs.Creator PatchManager *patch.Manager ToolchainManager *toolchain.Manager Printer *ui.Printer Verbose bool ConfigFile string}Holds all application dependencies, wired in New().
Key Functions
Section titled “Key Functions”func New(exec executor.Executor, fs filesystem.FileSystem, cfg *config.Config) *AppCreates and wires all dependencies.
BuildRootCommand
Section titled “BuildRootCommand”func (a *App) BuildRootCommand() *cobra.CommandBuilds the root Cobra command with all subcommands registered.
Commands Context
Section titled “Commands Context”type Context struct { Exec executor.Executor FS filesystem.FileSystem Config *config.Config AppContext *elcontext.Context KernelBuilder *builder.KernelBuilder // ... other builders Verbose *bool ConfigFile *string}Passed to command registrations for access to dependencies.
The app layer is the entry point, initialized in main.go and executed via Cobra.