aboutsummaryrefslogtreecommitdiff
path: root/bucket_test.go
diff options
context:
space:
mode:
authorKevin Gillette <extemporalgenome@gmail.com>2014-04-25 15:38:42 -0600
committerKevin Gillette <extemporalgenome@gmail.com>2014-04-25 15:38:42 -0600
commit1879d88c4366fcc64829a95423cdb1d0024d3472 (patch)
tree27fa5fd6505caad44f00a4c949a2241bb492e740 /bucket_test.go
parentMerge pull request #139 from Shopify/moar_c_cursor (diff)
downloaddedo-1879d88c4366fcc64829a95423cdb1d0024d3472.tar.gz
dedo-1879d88c4366fcc64829a95423cdb1d0024d3472.tar.xz
Printf's %s and %q do the right thing with []byte; removed string conversion.
Diffstat (limited to 'bucket_test.go')
-rw-r--r--bucket_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/bucket_test.go b/bucket_test.go
index d0133f8..c506b72 100644
--- a/bucket_test.go
+++ b/bucket_test.go
@@ -745,7 +745,7 @@ func ExampleBucket_Put() {
// Read value back in a different read-only transaction.
db.Update(func(tx *Tx) error {
value := tx.Bucket([]byte("widgets")).Get([]byte("foo"))
- fmt.Printf("The value of 'foo' is: %s\n", string(value))
+ fmt.Printf("The value of 'foo' is: %s\n", value)
return nil
})
@@ -770,7 +770,7 @@ func ExampleBucket_Delete() {
// Retrieve the key back from the database and verify it.
value := b.Get([]byte("foo"))
- fmt.Printf("The value of 'foo' was: %s\n", string(value))
+ fmt.Printf("The value of 'foo' was: %s\n", value)
return nil
})
@@ -809,7 +809,7 @@ func ExampleBucket_ForEach() {
// Iterate over items in sorted key order.
b.ForEach(func(k, v []byte) error {
- fmt.Printf("A %s is %s.\n", string(k), string(v))
+ fmt.Printf("A %s is %s.\n", k, v)
return nil
})
return nil