func demuxEvents(w draw.Window, kc chan int) { for event := range w.EventChan() { switch e := event.(type) { case draw.KeyEvent: kc <- e.Key } } os.Exit(0) }
func demuxEvents(w draw.Window) { for event := range w.EventChan() { switch e := event.(type) { case draw.MouseEvent: mousec <- e case draw.ConfigEvent: resizec <- true case draw.KeyEvent: kbdc <- e.Key } } os.Exit(0) }