Merge pull request #180 from yosssi/fix-example-bucket-put

Fix `ExampleBucket_Put` to use `db.View` instead of `db.Update`.
pull/34/head
Ben Johnson 2014-06-02 09:08:53 -06:00
commit b15b963550
1 changed files with 1 additions and 1 deletions

View File

@ -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