code: func generateTarGz(descriptors []*Descriptor) ([]byte, error) {
  	// set up the gzip writer
  	var codePackage bytes.Buffer
  	gw := gzip.NewWriter(&codePackage)
  	tw := tar.NewWriter(gw)
  	for _, v := range descriptors {
  		logger.Debugf("generateTarGz for %s", v.fqp)
  		err := packEntry(tw, gw, v)
  		if err != nil {
  			err1 := closeStream(tw, gw)
  			if err1 != nil {
  				return nil, errors.Wrap(err, fmt.Sprintf("packEntry failed and close error %s", err1))
  			}
  			return nil, errors.Wrap(err, "packEntry failed")
  		}
  	}
  	err := closeStream(tw, gw)
  	if err != nil {
  		return nil, errors.Wrap(err, "closeStream failed")
  	}
  	return codePackage.Bytes(), nil
  
  }
docs: // -------------------------------------------------------------------------
  // generateTarGz(descriptors)
  // -------------------------------------------------------------------------
  // creates an .tar.gz stream from the provided descriptor entries
  // -------------------------------------------------------------------------