From 69a1851685ead0991a28b89e068500c11a558f86 Mon Sep 17 00:00:00 2001 From: carabasdaniel Date: Fri, 2 Jun 2023 10:25:57 +0300 Subject: [PATCH] Update content/oci/oci.go Co-authored-by: Terry Howe Signed-off-by: carabasdaniel --- content/oci/oci.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/content/oci/oci.go b/content/oci/oci.go index f4d9fa3a..0866c0f7 100644 --- a/content/oci/oci.go +++ b/content/oci/oci.go @@ -193,26 +193,6 @@ func (s *Store) Resolve(ctx context.Context, reference string) (ocispec.Descript return desc, nil } -// Untag removes a reference string from index. -// reference should be a valid tag (e.g. "latest"). -// Reference: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc2/image-layout.md#indexjson-file -func (s *Store) Untag(ctx context.Context, descr ocispec.Descriptor, reference string) error { - if err := validateReference(reference); err != nil { - return err - } - - s.tagResolver.Delete((reference)) - s.tagResolver.Delete(descr.Digest.String()) - - if s.AutoSaveIndex { - err := s.SaveIndex() - if err != nil { - return err - } - } - - return nil -} // Delete removed a target descriptor from index and storage. func (s *Store) Delete(ctx context.Context, target ocispec.Descriptor) error {