code: func (i *Index) Close() error {
  	for _, cbi := range i.recordChans {
  		close(cbi)
  	}
  	i.importWG.Wait()
  	return nil
  }
docs: // Close ensures that all ongoing imports have finished and cleans up internal
  // state.