encoding/binary: better example
leave that joke to Java.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5695080
diff --git a/src/pkg/encoding/binary/example_test.go b/src/pkg/encoding/binary/example_test.go
index 405ea67..dec12eb 100644
--- a/src/pkg/encoding/binary/example_test.go
+++ b/src/pkg/encoding/binary/example_test.go
@@ -25,9 +25,9 @@
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 @@
}
}
fmt.Printf("%x", buf.Bytes())
- // Output: cafebabe
+ // Output: beefcafe
}
func ExampleRead() {