diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2012-02-28 10:15:23 +1100 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2012-02-28 10:15:23 +1100 |
| commit | fa33fdbc7dc29f5c24c9a82868cbaf076ba59214 (patch) | |
| tree | 84f26b92c5e37882a8c19220d77693cd478595f7 /src/pkg/encoding/binary | |
| parent | ce51e1074995cf7f1369b26d059d5a86e7b82e98 (diff) | |
| download | go-fa33fdbc7dc29f5c24c9a82868cbaf076ba59214.tar.xz | |
encoding/binary: better example
leave that joke to Java.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5695080
Diffstat (limited to 'src/pkg/encoding/binary')
| -rw-r--r-- | src/pkg/encoding/binary/example_test.go | 4 |
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 405ea67891..dec12ebf5d 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() { |
