File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -99,16 +99,6 @@ func (d *accessor) GetSize(key ds.Key) (size int, err error) {
9999}
100100
101101func (a * accessor ) Delete (key ds.Key ) (err error ) {
102- // leveldb Delete will not return an error if the key doesn't
103- // exist (see https://github.com/syndtr/goleveldb/issues/109),
104- // so check that the key exists first and if not return an
105- // error
106- exists , err := a .ldb .Has (key .Bytes (), nil )
107- if ! exists {
108- return ds .ErrNotFound
109- } else if err != nil {
110- return err
111- }
112102 return a .ldb .Delete (key .Bytes (), nil )
113103}
114104
Original file line number Diff line number Diff line change 11module github.com/ipfs/go-ds-leveldb
22
33require (
4- github.com/ipfs/go-datastore v0.0.3
4+ github.com/ipfs/go-datastore v0.1.0
55 github.com/syndtr/goleveldb v1.0.0
66)
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
1010github.com/google/uuid v1.1.1 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
1111github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI =
1212github.com/hpcloud/tail v1.0.0 /go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU =
13- github.com/ipfs/go-datastore v0.0.3 h1:/eP3nMDmLzMJNoWSSYvEkmMTTrm9FFCN+JraP9NdlwU =
14- github.com/ipfs/go-datastore v0.0.3 /go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE =
13+ github.com/ipfs/go-datastore v0.1.0 h1:TOxI04l8CmO4zGtesENhzm4PwkFwJXY3rKiYaaMf9fI =
14+ github.com/ipfs/go-datastore v0.1.0 /go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE =
1515github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8 /go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw =
1616github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 h1:bspPhN+oKYFk5fcGNuQzp6IGzYQSenLEgH3s6jkXrWw =
1717github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 /go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY =
You can’t perform that action at this time.
0 commit comments