Merge pull request #287 from justphil/master

fix 'range scans' example
master
Ben Johnson 2015-01-18 07:55:06 -08:00
commit 359b138d73
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ db.View(func(tx *bolt.Tx) error {
max := []byte("2000-01-01T00:00:00Z")
// Iterate over the 90's.
for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) != -1; k, v = c.Next() {
for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) <= 0; k, v = c.Next() {
fmt.Printf("%s: %s\n", k, v)
}