Changed the iterations

This commit is contained in:
Paul W. Homer 2017-03-17 14:34:11 -04:00
parent bb8104b624
commit d6205eb4ca
1 changed files with 4 additions and 2 deletions

View File

@ -95,8 +95,10 @@ func (db *GoLevelDB) Iterator() Iterator {
}
func (db *GoLevelDB) Next(iter Iterator) ([]byte, []byte) {
iter.Next()
return iter.Key(), iter.Value()
if iter.Next() {
return iter.Key(), iter.Value()
}
return nil, nil
}
func (db *GoLevelDB) NewBatch() Batch {