Skip to content

Commit

Permalink
no pedantic (#279)
Browse files Browse the repository at this point in the history
* no pedantic

* regenerate certs
  • Loading branch information
faddat authored Aug 7, 2022
1 parent 70f3529 commit b599fa5
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ func (db *RocksDB) Set(key []byte, value []byte) error {
if value == nil {
return errValueNil
}
err := db.db.Put(db.wo, key, value)
if err != nil {
return err
}
return nil
return db.db.Put(db.wo, key, value)
}

// SetSync implements DB.
Expand All @@ -110,35 +106,23 @@ func (db *RocksDB) SetSync(key []byte, value []byte) error {
if value == nil {
return errValueNil
}
err := db.db.Put(db.woSync, key, value)
if err != nil {
return err
}
return nil
return db.db.Put(db.woSync, key, value)
}

// Delete implements DB.
func (db *RocksDB) Delete(key []byte) error {
if len(key) == 0 {
return errKeyEmpty
}
err := db.db.Delete(db.wo, key)
if err != nil {
return err
}
return nil
return db.db.Delete(db.wo, key)
}

// DeleteSync implements DB.
func (db *RocksDB) DeleteSync(key []byte) error {
if len(key) == 0 {
return errKeyEmpty
}
err := db.db.Delete(db.woSync, key)
if err != nil {
return nil
}
return nil
return db.db.Delete(db.woSync, key)
}

func (db *RocksDB) DB() *gorocksdb.DB {
Expand Down

0 comments on commit b599fa5

Please sign in to comment.