summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2012-02-28 10:15:23 +1100
committerBrad Fitzpatrick <bradfitz@golang.org>2012-02-28 10:15:23 +1100
commit844ee4d886a16b4afa15ee26c70f0e9d76f43255 (patch)
tree5c55bda7bfaacd764174ba7bf08bb81f91c66c62
parent60f1d03252113d99158027b17908ccd6decf39fc (diff)
downloadgo-844ee4d886a16b4afa15ee26c70f0e9d76f43255.tar.gz
encoding/binary: better example
leave that joke to Java. R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/5695080
-rw-r--r--src/pkg/encoding/binary/example_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/encoding/binary/example_test.go b/src/pkg/encoding/binary/example_test.go
index 405ea6789..dec12ebf5 100644
--- a/src/pkg/encoding/binary/example_test.go
+++ b/src/pkg/encoding/binary/example_test.go
@@ -25,9 +25,9 @@ func ExampleWrite() {
func ExampleWrite_multi() {
buf := new(bytes.Buffer)
var data = []interface{}{
+ uint16(61374),
int8(-54),
uint8(254),
- uint16(48826),
}
for _, v := range data {
err := binary.Write(buf, binary.LittleEndian, v)
@@ -36,7 +36,7 @@ func ExampleWrite_multi() {
}
}
fmt.Printf("%x", buf.Bytes())
- // Output: cafebabe
+ // Output: beefcafe
}
func ExampleRead() {