From a9189ddefb9d9568cc6f2642058cbb180f2fea5f Mon Sep 17 00:00:00 2001 From: yosssi Date: Sat, 31 May 2014 11:22:50 +0900 Subject: [PATCH] Fix `ExampleBucket_Put` to use `db.View` instead of `db.Update`. --- bucket_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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