Skip to content
Myr

Print error (and exit) if there's trouble when starting the example program

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 293c2f6 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:example/main.go+3 added-1 removed
7 unmodified lines
8type Model int910func main() {11 p := tea.NewProgram(0, update, view)12 p.Start()12 if err := p.Start(); err != nil {13 fmt.Println("could not start program:", err)14 }15}1617func update(msg tea.Msg, model tea.Model) (tea.Model, tea.Cmd) {18 m, _ := model.(Model)
56 unmodified lines