aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryosssi <yoshida.keiji.84@gmail.com>2014-05-31 11:22:50 +0900
committeryosssi <yoshida.keiji.84@gmail.com>2014-05-31 11:22:50 +0900
commita9189ddefb9d9568cc6f2642058cbb180f2fea5f (patch)
treeb2ab558157017c71ec4f0acb2fdb5443a1b0aa59
parentMerge pull request #179 from benbjohnson/freelist-assertion (diff)
downloaddedo-a9189ddefb9d9568cc6f2642058cbb180f2fea5f.tar.gz
dedo-a9189ddefb9d9568cc6f2642058cbb180f2fea5f.tar.xz
Fix `ExampleBucket_Put` to use `db.View` instead of `db.Update`.
-rw-r--r--bucket_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/bucket_test.go b/bucket_test.go
index 16172a5..9ed63ee 100644
--- a/bucket_test.go
+++ b/bucket_test.go
@@ -939,7 +939,7 @@ func ExampleBucket_Put() {
})
// Read value back in a different read-only transaction.
- db.Update(func(tx *Tx) error {
+ db.View(func(tx *Tx) error {
value := tx.Bucket([]byte("widgets")).Get([]byte("foo"))
fmt.Printf("The value of 'foo' is: %s\n", value)
return nil