Fix GetByte
This commit is contained in:
@@ -122,6 +122,9 @@ func (b *DB) GetBytes(path []string, key string) ([]byte, error) {
|
||||
}
|
||||
// newBkt should have the last bucket in the path
|
||||
val := bkt.Get([]byte(key))
|
||||
if val == nil {
|
||||
return fmt.Errorf("Couldn't find value")
|
||||
}
|
||||
ret = make([]byte, len(val))
|
||||
copy(ret, val)
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user