Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
d5c806d5
Commit
d5c806d5
authored
Aug 27, 2013
by
Mathieu Lonjaret
Committed by
Brad Fitzpatrick
Aug 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encoding/binary: use bytes.Reader in read example
R=golang-dev, dave CC=golang-dev
https://golang.org/cl/13274043
parent
11320fa5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
example_test.go
src/pkg/encoding/binary/example_test.go
+1
-1
No files found.
src/pkg/encoding/binary/example_test.go
View file @
d5c806d5
...
...
@@ -42,7 +42,7 @@ func ExampleWrite_multi() {
func
ExampleRead
()
{
var
pi
float64
b
:=
[]
byte
{
0x18
,
0x2d
,
0x44
,
0x54
,
0xfb
,
0x21
,
0x09
,
0x40
}
buf
:=
bytes
.
New
Buff
er
(
b
)
buf
:=
bytes
.
New
Read
er
(
b
)
err
:=
binary
.
Read
(
buf
,
binary
.
LittleEndian
,
&
pi
)
if
err
!=
nil
{
fmt
.
Println
(
"binary.Read failed:"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment