func tarDirectory(src, dst string) error {
	// input is a stream of bytes from the archive of the directory at path
	input, err := archive.Tar(src, archive.Uncompressed)
	if err != nil {
		return errors.Wrapf(err, "error retrieving stream of bytes from %q", src)
	}

	// creates the tar file
	outFile, err := os.Create(dst)
	if err != nil {
		return errors.Wrapf(err, "error creating tar file %q", dst)
	}
	defer outFile.Close()

	// copies the contents of the directory to the tar file
	// TODO: This can take quite some time, and should ideally be cancellable using a context.Context.
	_, err = io.Copy(outFile, input)

	return err
}
func tarDirectory(src, dst string) error {
	
	input, err := archive.Tar(src, archive.Uncompressed)
	if err != nil {
		return errors.Wrapf(err, "error retrieving stream of bytes from %q", src)
	}

	
	outFile, err := os.Create(dst)
	if err != nil {
		return errors.Wrapf(err, "error creating tar file %q", dst)
	}
	defer outFile.Close()

	
	
	_, err = io.Copy(outFile, input)

	return err
}
func tarDirectory ( src , dst string ) error { // input is a stream of bytes from the archive of the directory at path input , err := archive . Tar ( src , archive . Uncompressed ) if err != nil { return errors . Wrapf ( err , " " , src ) } // creates the tar file outFile , err := os . Create ( dst ) if err != nil { return errors . Wrapf ( err , " " , dst ) } defer outFile . Close ( ) // copies the contents of the directory to the tar file // TODO: This can take quite some time, and should ideally be cancellable using a context.Context. _ , err = io . Copy ( outFile , input ) return err }
// tar converts the directory at src and saves it to dst
tar converts the directory at src and saves it to dst