code: func NewAggregateFromChannel(errCh chan error, ctx context.Context) error {
  	var errs []error
  
  Loop:
  	for {
  		select {
  		case err, ok := <-errCh:
  			if !ok { // the channel is closed, time to exit
  				break Loop
  			}
  			errs = append(errs, err)
  		case <-ctx.Done():
  			break Loop
  		}
  	}
  
  	return NewAggregate(errs...)
  }
docs: // NewAggregateFromChannel creates a new aggregate instance from the provided
  // errors channel.
  //
  // A context.Context can be passed in so the caller has the ability to cancel
  // the operation. If this is not desired, simply pass context.Background().