mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Print error (and exit) if there's trouble when starting the example program
This commit is contained in:
@@ -9,7 +9,9 @@ type Model int
|
||||
|
||||
func main() {
|
||||
p := tea.NewProgram(0, update, view)
|
||||
p.Start()
|
||||
if err := p.Start(); err != nil {
|
||||
fmt.Println("could not start program:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func update(msg tea.Msg, model tea.Model) (tea.Model, tea.Cmd) {
|
||||
|
||||
Reference in New Issue
Block a user