code: func AggregateDone(events []func(chan error), done chan error) {
  	partialDone := make(chan error, 5)
  
  	go collectDoneEvents(partialDone, done, len(events))
  
  	for _, event := range events {
  		event(partialDone) // fire event
  	}
  }
docs: // AggregateDone can be reused to avoid repetitive code that triggers a slice of events and waits until it is finished.