aboutsummaryrefslogtreecommitdiff
path: root/example_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-04-04 12:03:04 -0600
committerBen Johnson <benbjohnson@yahoo.com>2014-04-04 12:03:04 -0600
commit12204df0b5aaad6aeb0f498b702b0fa375fc4f95 (patch)
tree8cfb509c6e5c4bbc60f5ae4c036644342dbac899 /example_test.go
parentMerge pull request #118 from benbjohnson/commit-hook (diff)
downloaddedo-12204df0b5aaad6aeb0f498b702b0fa375fc4f95.tar.gz
dedo-12204df0b5aaad6aeb0f498b702b0fa375fc4f95.tar.xz
Rename internal local Tx variables.
This commit changes the local Tx variables from "t" to "tx". This is partly for consistency with external documentation but also because it just annoys me for some reason.
Diffstat (limited to 'example_test.go')
-rw-r--r--example_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/example_test.go b/example_test.go
index eeaecf5..3e3758e 100644
--- a/example_test.go
+++ b/example_test.go
@@ -54,8 +54,8 @@ func ExampleDB_View() {
})
// Access data from within a read-only transactional block.
- db.View(func(t *Tx) error {
- v := t.Bucket("people").Get([]byte("john"))
+ db.View(func(tx *Tx) error {
+ v := tx.Bucket("people").Get([]byte("john"))
fmt.Printf("John's last name is %s.\n", string(v))
return nil
})