remove tile-remove method

This commit is contained in:
NatureFreshMilk 2019-02-21 08:12:20 +01:00
parent 4c95e6daaf
commit 1e91b9998c
2 changed files with 0 additions and 23 deletions

View File

@ -65,15 +65,3 @@ func (this *TileDB) SetTile(pos *coords.TileCoords, tile []byte) error {
return err
}
func (this *TileDB) RemoveTile(pos *coords.TileCoords) error {
timer := prometheus.NewTimer(removeDuration)
defer timer.ObserveDuration()
err := this.db.Update(func(txn *badger.Txn) error {
err := txn.Delete(getKey(pos))
return err
})
return err
}

View File

@ -35,17 +35,6 @@ func TestTileDB(t *testing.T) {
t.Error("wrong size")
}
db.RemoveTile(c)
tile, err = db.GetTile(c)
if err != nil {
panic(err)
}
if tile != nil {
t.Error("tile not removed")
}
c2 := coords.NewTileCoords(1, 0, 1, 2)
tile, err = db.GetTile(c2)
if err != nil {