diff options
Diffstat (limited to 'src/pkg/encoding/binary/example_test.go')
-rw-r--r-- | src/pkg/encoding/binary/example_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/encoding/binary/example_test.go b/src/pkg/encoding/binary/example_test.go index 297d6c1ae..405ea6789 100644 --- a/src/pkg/encoding/binary/example_test.go +++ b/src/pkg/encoding/binary/example_test.go @@ -11,7 +11,6 @@ import ( "math" ) -// 18 2d 44 54 fb 21 09 40 func ExampleWrite() { buf := new(bytes.Buffer) var pi float64 = math.Pi @@ -20,9 +19,9 @@ func ExampleWrite() { fmt.Println("binary.Write failed:", err) } fmt.Printf("% x", buf.Bytes()) + // Output: 18 2d 44 54 fb 21 09 40 } -// cafebabe func ExampleWrite_multi() { buf := new(bytes.Buffer) var data = []interface{}{ @@ -37,9 +36,9 @@ func ExampleWrite_multi() { } } fmt.Printf("%x", buf.Bytes()) + // Output: cafebabe } -// 3.141592653589793 func ExampleRead() { var pi float64 b := []byte{0x18, 0x2d, 0x44, 0x54, 0xfb, 0x21, 0x09, 0x40} @@ -49,4 +48,5 @@ func ExampleRead() { fmt.Println("binary.Read failed:", err) } fmt.Print(pi) + // Output: 3.141592653589793 } |