MCPcopy
hub / github.com/Azure/aztfexport / updateChildren

Function updateChildren

internal/ui/ui.go:204–228  ·  view source on GitHub ↗
(msg tea.Msg, m model)

Source from the content-addressed store, hash-verified

202}
203
204func updateChildren(msg tea.Msg, m model) (model, tea.Cmd) {
205 var cmd tea.Cmd
206 switch m.status {
207 case statusBuildingImportList:
208 m.importlist, cmd = m.importlist.Update(msg)
209 return m, cmd
210 case statusImportErrorMsg:
211 if _, ok := msg.(tea.KeyMsg); ok {
212 m.status = statusBuildingImportList
213 m.importlist = importlist.NewModel(m.ctx, m.meta, m.importerrormsg.List, m.importerrormsg.Index)
214 cmd = func() tea.Msg { return m.winsize }
215 return m, cmd
216 }
217 case statusImporting:
218 m.progress, cmd = m.progress.Update(msg)
219 return m, cmd
220 case statusSummary:
221 switch msg.(type) {
222 case tea.KeyMsg:
223 m.status = statusQuitting
224 return m, aztfexportclient.Quit(m.ctx, m.meta)
225 }
226 }
227 return m, nil
228}
229
230func (m model) View() string {
231 s := m.logoView()

Callers 1

UpdateMethod · 0.85

Calls 3

NewModelFunction · 0.92
QuitFunction · 0.92
UpdateMethod · 0.45

Tested by

no test coverage detected