diff options
author | Roman Naumann <roman.naumann@hu-berlin.de> | 2016-09-13 11:19:31 +0200 |
---|---|---|
committer | Roman Naumann <roman.naumann@hu-berlin.de> | 2016-09-13 11:19:31 +0200 |
commit | 1e271f5035b10f8f91a1c073a39301e730b744fa (patch) | |
tree | 88e727f92688ed87a8ad91f62317d5cd25cd814a | |
parent | Merge pull request #594 from anacrolix/patch-1 (diff) | |
download | dedo-1e271f5035b10f8f91a1c073a39301e730b744fa.tar.gz dedo-1e271f5035b10f8f91a1c073a39301e730b744fa.tar.xz |
Update README.md
Add warning to README.md that keys and values in `ForEach()` are
invalid outside of transaction.
-rw-r--r-- | README.md | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |