refactor: harden diagnostics and consolidate runtime code
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -14,20 +13,6 @@ func (a *App) ListRemovableTargets() ([]platform.RemovableTarget, error) {
|
||||
return a.exports.ListRemovableTargets()
|
||||
}
|
||||
|
||||
// ListScenarioFilesOnRemovableMedia lists scenarios/*.json found on any
|
||||
// mounted removable target (e.g. the blackbox USB stick) — see
|
||||
// platform.System.ListScenarioFilesOnRemovableMedia.
|
||||
func (a *App) ListScenarioFilesOnRemovableMedia() ([]platform.ScenarioFileOnRemovableMedia, error) {
|
||||
return a.exports.ListScenarioFilesOnRemovableMedia()
|
||||
}
|
||||
|
||||
// ReadScenarioFromRemovableMedia reads scenarios/<name>.json from whichever
|
||||
// mounted removable target has it — see
|
||||
// platform.System.ReadScenarioFromRemovableMedia.
|
||||
func (a *App) ReadScenarioFromRemovableMedia(name string) ([]byte, error) {
|
||||
return a.exports.ReadScenarioFromRemovableMedia(name)
|
||||
}
|
||||
|
||||
// ListAvailableScenarios lists every scenario runnable via ReadScenario:
|
||||
// shipped with the image plus anything found on removable media — see
|
||||
// platform.System.ListAvailableScenarios.
|
||||
@@ -86,7 +71,3 @@ func (a *App) ExportSupportBundleResult(target platform.RemovableTarget) (Action
|
||||
func (a *App) ListInstallDisks() ([]platform.InstallDisk, error) {
|
||||
return a.installer.ListInstallDisks()
|
||||
}
|
||||
|
||||
func (a *App) InstallToDisk(ctx context.Context, device string, logFile string) error {
|
||||
return a.installer.InstallToDisk(ctx, device, logFile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user