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
d4d06358
Commit
d4d06358
authored
Apr 12, 2013
by
Alexei Sholik
Committed by
Rob Pike
Apr 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/iotest: rephrase DataErrReader's description
R=r CC=golang-dev
https://golang.org/cl/8650044
parent
4925f8aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
reader.go
src/pkg/testing/iotest/reader.go
+5
-3
No files found.
src/pkg/testing/iotest/reader.go
View file @
d4d06358
...
...
@@ -37,9 +37,11 @@ func (r *halfReader) Read(p []byte) (int, error) {
return
r
.
r
.
Read
(
p
[
0
:
(
len
(
p
)
+
1
)
/
2
])
}
// DataErrReader returns a Reader that returns the final
// error with the last data read, instead of by itself with
// zero bytes of data.
// DataErrReader changes the way errors are handled by a Reader. Normally, a
// Reader returns an error (typically EOF) from the first Read call after the
// last piece of data is read. DataErrReader wraps a Reader and changes its
// behavior so the final error is returned along with the final data, instead
// of in the first call after the final data.
func
DataErrReader
(
r
io
.
Reader
)
io
.
Reader
{
return
&
dataErrReader
{
r
,
nil
,
make
([]
byte
,
1024
)}
}
type
dataErrReader
struct
{
...
...
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