Merge pull request #595 from namore/add_warning_foreach_keys

Update README.md
master
Ben Johnson 2016-09-13 10:53:39 -06:00 committed by GitHub
commit fff57c100f
1 changed files with 4 additions and 0 deletions

View File

@ -448,6 +448,10 @@ db.View(func(tx *bolt.Tx) error {
})
```
Please note that keys and values in `ForEach()` are only valid while
the transaction is open. If you need to use a key or value outside of
the transaction, you must use `copy()` to copy it to another byte
slice.
### Nested buckets