Skip to content

Commit

Permalink
Update content/oci/oci.go
Browse files Browse the repository at this point in the history
Co-authored-by: Terry Howe <[email protected]>
Signed-off-by: carabasdaniel <[email protected]>
  • Loading branch information
carabasdaniel and TerryHowe authored Jun 2, 2023
1 parent fca456b commit 0713b75
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions content/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0713b75

Please sign in to comment.