Commit fa33fdbc authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

encoding/binary: better example

leave that joke to Java.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5695080
parent ce51e107
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment