code: func (bi *blockImporter) statusHandler(resultsChan chan *importResults) {
  	select {
  	// An error from either of the goroutines means we're done so signal
  	// caller with the error and signal all goroutines to quit.
  	case err := <-bi.errChan:
  		resultsChan <- &importResults{
  			blocksProcessed: bi.blocksProcessed,
  			blocksImported:  bi.blocksImported,
  			err:             err,
  		}
  		close(bi.quit)
  
  	// The import finished normally.
  	case <-bi.doneChan:
  		resultsChan <- &importResults{
  			blocksProcessed: bi.blocksProcessed,
  			blocksImported:  bi.blocksImported,
  			err:             nil,
  		}
  	}
  }
docs: // statusHandler waits for updates from the import operation and notifies
  // the passed doneChan with the results of the import.  It also causes all
  // goroutines to exit if an error is reported from any of them.