code: func (g *Gui) consumeevents() error {
  	for {
  		select {
  		case ev := <-g.tbEvents:
  			if err := g.handleEvent(&ev); err != nil {
  				return err
  			}
  		case ev := <-g.userEvents:
  			if err := ev.f(g); err != nil {
  				return err
  			}
  		default:
  			return nil
  		}
  	}
  }
docs: // consumeevents handles the remaining events in the events pool.