From 1879d88c4366fcc64829a95423cdb1d0024d3472 Mon Sep 17 00:00:00 2001 From: Kevin Gillette Date: Fri, 25 Apr 2014 15:38:42 -0600 Subject: Printf's %s and %q do the right thing with []byte; removed string conversion. --- bucket_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bucket_test.go') 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 -- cgit v1.2.3