MCPcopy Create free account
hub / github.com/SamNet-dev/snix / newApp

Function newApp

tui/app.go:82–99  ·  view source on GitHub ↗
(opts Options)

Source from the content-addressed store, hash-verified

80}
81
82func newApp(opts Options) App {
83 cfg, cfgErr := config.Load(opts.ConfigPath)
84 a := App{
85 opts: opts,
86 keys: defaultKeys(),
87 active: tabHome,
88 cfg: cfg,
89 cfgErr: cfgErr,
90 }
91 a.home = newHomeModel(&a)
92 a.profiles = newProfilesModel(&a)
93 a.scan = newScanModel(&a)
94 a.run = newRunModel(&a)
95 a.settings = newSettingsModel(&a)
96 a.help = newHelpModel(&a)
97 a.about = newAboutModel(&a)
98 return a
99}
100
101// Init starts any background tick processes the screens need.
102func (a App) Init() tea.Cmd {

Callers 1

RunFunction · 0.85

Calls 9

LoadFunction · 0.92
defaultKeysFunction · 0.85
newHomeModelFunction · 0.85
newProfilesModelFunction · 0.85
newScanModelFunction · 0.85
newRunModelFunction · 0.85
newSettingsModelFunction · 0.85
newHelpModelFunction · 0.85
newAboutModelFunction · 0.85

Tested by

no test coverage detected