code: func (si *shareImporter) importAll(ctx context.Context) error {
  	src, shared, err := client.NewFromShareRoot(ctx, si.shareURL, client.OptionNoExternalConfig())
  	if err != nil {
  		return err
  	}
  	si.src = src
  	si.br = shared
  	si.workc = make(chan work, 2*numWorkers)
  	defer close(si.workc)
  
  	// fan out over a pool of numWorkers workers overall
  	for i := 0; i < numWorkers; i++ {
  		go func() {
  			for wi := range si.workc {
  				wi.errc <- si.imprt(ctx, wi.br)
  			}
  		}()
  	}
  	// work assignment is done asynchronously, so imprt returns before all the work is finished.
  	err = si.imprt(ctx, shared)
  	si.wg.Wait()
  	if err == nil {
  		si.mu.RLock()
  		err = si.err
  		si.mu.RUnlock()
  	}
  	log.Print("share importer: all workers done")
  	if err != nil {
  		return err
  	}
  	return nil
  }
docs: // importAll imports all the shared contents transitively reachable under
  // si.shareURL.