Clean up and normalize examples

This commit is contained in:
Christian Rocha
2021-05-01 09:28:58 -04:00
parent 64ae19f37e
commit 7c0bbc7d32
15 changed files with 56 additions and 92 deletions

View File

@@ -50,11 +50,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
switch msg.Type {
case tea.KeyCtrlC:
fallthrough
case tea.KeyEsc:
fallthrough
case tea.KeyEnter:
case tea.KeyEnter, tea.KeyCtrlC, tea.KeyEsc:
return m, tea.Quit
}