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
c8423f90
Commit
c8423f90
authored
Aug 07, 2012
by
Brad Fitzpatrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
io: document ReaderFrom and WriterTo
Fixes #3711 R=golang-dev, adg CC=golang-dev
https://golang.org/cl/6445083
parent
b3caa2ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
io.go
src/pkg/io/io.go
+12
-0
No files found.
src/pkg/io/io.go
View file @
c8423f90
...
@@ -130,11 +130,23 @@ type ReadWriteSeeker interface {
...
@@ -130,11 +130,23 @@ type ReadWriteSeeker interface {
}
}
// ReaderFrom is the interface that wraps the ReadFrom method.
// ReaderFrom is the interface that wraps the ReadFrom method.
//
// ReadFrom reads data from r until EOF. The return value n is the
// number of bytes read. Any error except io.EOF encountered during
// the read is also returned.
//
// The Copy function uses ReaderFrom if available.
type
ReaderFrom
interface
{
type
ReaderFrom
interface
{
ReadFrom
(
r
Reader
)
(
n
int64
,
err
error
)
ReadFrom
(
r
Reader
)
(
n
int64
,
err
error
)
}
}
// WriterTo is the interface that wraps the WriteTo method.
// WriterTo is the interface that wraps the WriteTo method.
//
// WriteTo writes data to w until there's no more data to write or
// when an error occurs. The return value n is the number of bytes
// written. Any error encountered during the write is also returned.
//
// The Copy function uses WriterTo if available.
type
WriterTo
interface
{
type
WriterTo
interface
{
WriteTo
(
w
Writer
)
(
n
int64
,
err
error
)
WriteTo
(
w
Writer
)
(
n
int64
,
err
error
)
}
}
...
...
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