diff --git a/internal/resolver/memory.go b/internal/resolver/memory.go index 27d6a59d..2111d504 100644 --- a/internal/resolver/memory.go +++ b/internal/resolver/memory.go @@ -48,8 +48,8 @@ func (m *Memory) Tag(_ context.Context, desc ocispec.Descriptor, reference strin return nil } -// Delete removes a reference from index map. -func (m *Memory) Delete(reference string) { +// Untag removes a reference from index map. +func (m *Memory) Untag(reference string) { m.index.Delete(reference) } diff --git a/internal/resolver/memory_test.go b/internal/resolver/memory_test.go index fe365cca..f6f04b06 100644 --- a/internal/resolver/memory_test.go +++ b/internal/resolver/memory_test.go @@ -55,7 +55,7 @@ func TestMemorySuccess(t *testing.T) { t.Errorf("Memory.Map() = %v, want %v", got, 1) } - s.Delete(ref) + s.Untag(ref) _, err = s.Resolve(ctx, ref) if !errors.Is(err, errdef.ErrNotFound) { t.Errorf("Memory.Resolve() error = %v, want %v", err, errdef.ErrNotFound)