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
}
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 + pathImageAci ) , " " ) } if err := tar . AddFile ( path + common . PathManifest ) ; err != nil { return errs . WithEF ( err , aci . fields . WithField ( " " , path + common . PathManifest ) , " " ) } if err := tar . AddAll ( path + common . PathRootfs , true ) ; err != nil { return errs . WithEF ( err , aci . fields . WithField ( " " , path + common . PathRootfs ) , " " ) } if err := tar . Close ( ) ; err != nil { return errs . WithEF ( err , aci . fields . WithField ( " " , path ) , " " ) } os . Rename ( path + pathImageAci + " " , path + pathImageAci ) return nil }
//////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////