From d9cf7d147799431b5758db66b73044580c7876c8 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Sat, 11 Jan 2020 10:45:15 -0500 Subject: [PATCH] Print error (and exit) if there's trouble when starting the example program --- example/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/main.go b/example/main.go index ce4b2ce..2601d7f 100644 --- a/example/main.go +++ b/example/main.go @@ -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) {