0
0

+ 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:
indraniel 2015-03-22 10:27:13 -05:00
parent 5e55fa2866
commit a0a2a61050

View File

@ -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
}