code: func (b *Broadcaster) run() {
  	for {
  		select {
  		case block := <-b.events:
  			for _, sink := range b.sinks {
  				if err := sink.Write(block...); err != nil {
  					logrus.Errorf("broadcaster: error writing events to %v, these events will be lost: %v", sink, err)
  				}
  			}
  		case closing := <-b.closed:
  
  			// close all the underlying sinks
  			for _, sink := range b.sinks {
  				if err := sink.Close(); err != nil {
  					logrus.Errorf("broadcaster: error closing sink %v: %v", sink, err)
  				}
  			}
  			closing <- struct{}{}
  
  			logrus.Debugf("broadcaster: closed")
  			return
  		}
  	}
  }
docs: // run is the main broadcast loop, started when the broadcaster is created.
  // Under normal conditions, it waits for events on the event channel. After
  // Close is called, this goroutine will exit.