forked from Mirrors/bubbletea
Print error (and exit) if there's trouble when starting the example program
This commit is contained in:
parent
293c2f6696
commit
d9cf7d1477
|
@ -9,7 +9,9 @@ type Model int
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
p := tea.NewProgram(0, update, view)
|
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) {
|
func update(msg tea.Msg, model tea.Model) (tea.Model, tea.Cmd) {
|
||||||
|
|
Loading…
Reference in New Issue