code: func (p *displayPool) update(e *EventDisplays) {
  	p.m.Lock()
  	defer p.m.Unlock()
  	var ids = make(map[int64]bool)
  	for _, o := range e.All {
  		ids[*o.ID] = true
  		var primary bool
  		if *o.ID == *e.Primary.ID {
  			primary = true
  		}
  		if d, ok := p.d[*o.ID]; ok {
  			d.primary = primary
  			*d.o = *o
  		} else {
  			p.d[*o.ID] = newDisplay(o, primary)
  		}
  	}
  	for id := range p.d {
  		if _, ok := ids[id]; !ok {
  			delete(p.d, id)
  		}
  	}
  }
docs: // update updates the pool based on event displays