code: func (f *FIFO) Replace(list []interface{}, resourceVersion string) error {
  	items := make(map[string]interface{}, len(list))
  	for _, item := range list {
  		key, err := f.keyFunc(item)
  		if err != nil {
  			return KeyError{item, err}
  		}
  		items[key] = item
  	}
  
  	f.lock.Lock()
  	defer f.lock.Unlock()
  
  	if !f.populated {
  		f.populated = true
  		f.initialPopulationCount = len(items)
  	}
  
  	f.items = items
  	f.queue = f.queue[:0]
  	for id := range items {
  		f.queue = append(f.queue, id)
  	}
  	if len(f.queue) > 0 {
  		f.cond.Broadcast()
  	}
  	return nil
  }
docs: // Replace will delete the contents of 'f', using instead the given map.
  // 'f' takes ownership of the map, you should not reference the map again
  // after calling this function. f's queue is reset, too; upon return, it
  // will contain the items in the map, in no particular order.