From 941b7025b66659c1402b0ad18c4396b2919e3b4d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 12 Oct 2015 22:51:11 +0200 Subject: [PATCH] Delete Index.Remove() --- repository/index.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/repository/index.go b/repository/index.go index 9a0891f1f..6107d8c84 100644 --- a/repository/index.go +++ b/repository/index.go @@ -70,22 +70,6 @@ func (idx *Index) Store(t pack.BlobType, id backend.ID, pack *backend.ID, offset idx.store(t, id, pack, offset, length) } -// Remove removes the pack ID from the index. -func (idx *Index) Remove(packID backend.ID) { - idx.m.Lock() - defer idx.m.Unlock() - - if idx.final { - panic("remove item from finalized index") - } - - debug.Log("Index.Remove", "id %v removed", packID.Str()) - - if _, ok := idx.pack[packID]; ok { - delete(idx.pack, packID) - } -} - // Lookup returns the pack for the id. func (idx *Index) Lookup(id backend.ID) (packID *backend.ID, tpe pack.BlobType, offset, length uint, err error) { idx.m.Lock()