dgr/aci.go
func (aci *Aci) tarAci(path string) error {
	tar := new(archivex.TarFile)
	if err := tar.Create(path + pathImageAci); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path+pathImageAci), "Failed to create image tar")
	}
	if err := tar.AddFile(path + common.PathManifest); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path+common.PathManifest), "Failed to add manifest to tar")
	}
	if err := tar.AddAll(path+common.PathRootfs, true); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path+common.PathRootfs), "Failed to add rootfs to tar")
	}
	if err := tar.Close(); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path), "Failed to tar aci")
	}
	os.Rename(path+pathImageAci+".tar", path+pathImageAci)
	return nil
}
func (aci *Aci) tarAci(path string) error {
	tar := new(archivex.TarFile)
	if err := tar.Create(path + pathImageAci); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path+pathImageAci), "Failed to create image tar")
	}
	if err := tar.AddFile(path + common.PathManifest); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path+common.PathManifest), "Failed to add manifest to tar")
	}
	if err := tar.AddAll(path+common.PathRootfs, true); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path+common.PathRootfs), "Failed to add rootfs to tar")
	}
	if err := tar.Close(); err != nil {
		return errs.WithEF(err, aci.fields.WithField("path", path), "Failed to tar aci")
	}
	os.Rename(path+pathImageAci+".tar", path+pathImageAci)
	return nil
}
//////////////////////////////////////////////////////////////////