Browse Source

Changed the iterations

pull/1842/head
Paul W. Homer 8 years ago
parent
commit
d6205eb4ca
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      go_level_db.go

+ 4
- 2
go_level_db.go 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 {


Loading…
Cancel
Save