From 5901cf5e028e2e39c31001401d4e3afe738e150f Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Thu, 12 Oct 2023 14:54:46 +0000 Subject: [PATCH] make it runnable now, need to resolve comment Signed-off-by: Xiaoxuan Wang --- content/oci/deletableoci.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/oci/deletableoci.go b/content/oci/deletableoci.go index d68a5e72..a94332c6 100644 --- a/content/oci/deletableoci.go +++ b/content/oci/deletableoci.go @@ -57,7 +57,7 @@ type DeletableStore struct { storage *Storage tagResolver *resolver.Memory - graph *graph.DeletableMemory + graph *graph.Memory } // NewDeletableStore returns a new DeletableStore. @@ -78,12 +78,12 @@ func NewDeletableStoreWithContext(ctx context.Context, root string) (*DeletableS store := &DeletableStore{ AutoSaveIndex: true, root: rootAbs, - indexPath: filepath.Join(rootAbs, ociImageIndexFile), + indexPath: filepath.Join(rootAbs, ocispec.ImageIndexFile), storage: storage, tagResolver: resolver.NewMemory(), - graph: graph.NewDeletableMemory(), + graph: graph.NewMemory(), } - if err := ensureDir(filepath.Join(rootAbs, ociBlobsDir)); err != nil { + if err := ensureDir(filepath.Join(rootAbs, ocispec.ImageBlobsDir)); err != nil { return nil, err } if err := store.ensureOCILayoutFile(); err != nil { @@ -338,7 +338,7 @@ func (ds *DeletableStore) writeIndexFile() error { } // loadIndexInDeletableMemory loads index into the memory. -func loadIndexInDeletableMemory(ctx context.Context, index *ocispec.Index, fetcher content.Fetcher, tagger content.Tagger, graph *graph.DeletableMemory) error { +func loadIndexInDeletableMemory(ctx context.Context, index *ocispec.Index, fetcher content.Fetcher, tagger content.Tagger, graph *graph.Memory) error { for _, desc := range index.Manifests { if err := tagger.Tag(ctx, deleteAnnotationRefName(desc), desc.Digest.String()); err != nil { return err