package main import ( "git.tilde.town/nbsp/neofeels/app" "git.tilde.town/nbsp/neofeels/ui" ) func main() { state, err := ui.New(app.NewMainMenu()) if err != nil { panic(err) } defer state.Close() loop: for { select { case event := <-ui.Events: state.HandleEvent(event) case newState := <-ui.ViewChange: state.HandleViewChange(newState) case <-ui.Quit: break loop } } }