diff options
author | yosssi <yoshida.keiji.84@gmail.com> | 2014-05-31 11:22:50 +0900 |
---|---|---|
committer | yosssi <yoshida.keiji.84@gmail.com> | 2014-05-31 11:22:50 +0900 |
commit | a9189ddefb9d9568cc6f2642058cbb180f2fea5f (patch) | |
tree | b2ab558157017c71ec4f0acb2fdb5443a1b0aa59 | |
parent | Merge pull request #179 from benbjohnson/freelist-assertion (diff) | |
download | dedo-a9189ddefb9d9568cc6f2642058cbb180f2fea5f.tar.gz dedo-a9189ddefb9d9568cc6f2642058cbb180f2fea5f.tar.xz |
Fix `ExampleBucket_Put` to use `db.View` instead of `db.Update`.
-rw-r--r-- | bucket_test.go | 2 |
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 |