mirror of https://github.com/tidwall/buntdb.git
Fix doc iteration
This commit is contained in:
parent
acb9a96694
commit
da0b5d86c8
|
@ -137,6 +137,7 @@ All keys/value pairs are ordered in the database by the key. To iterate over the
|
||||||
err := db.View(func(tx *buntdb.Tx) error {
|
err := db.View(func(tx *buntdb.Tx) error {
|
||||||
err := tx.Ascend("", func(key, value string) bool {
|
err := tx.Ascend("", func(key, value string) bool {
|
||||||
fmt.Printf("key: %s, value: %s\n", key, value)
|
fmt.Printf("key: %s, value: %s\n", key, value)
|
||||||
|
return true // continue iteration
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue