+ keep 'get' consistent with levigo implementation
- this change keeps the method behavior consistent with the levigo/leveldb implementation. - don't issue an err if a key isn't found
This commit is contained in:
parent
5e55fa2866
commit
a0a2a61050
@ -49,6 +49,9 @@ func Open(path string, config map[string]interface{}) (*Store, error) {
|
||||
func (ldbs *Store) get(key []byte) ([]byte, error) {
|
||||
options := defaultReadOptions()
|
||||
b, err := ldbs.db.Get(key, options)
|
||||
if err == leveldb.ErrNotFound {
|
||||
return nil, nil
|
||||
}
|
||||
return b, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user