Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
71f19d66
Commit
71f19d66
authored
Jun 22, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document requirements on Write method
R=r DELTA=7 (6 added, 0 deleted, 1 changed) OCL=30596 CL=30605
parent
23d91971
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/pkg/io/io.go
src/pkg/io/io.go
+7
-1
No files found.
src/pkg/io/io.go
View file @
71f19d66
...
...
@@ -30,7 +30,8 @@ var ErrUnexpectedEOF os.Error = &Error{"unexpected EOF"}
// Reader is the interface that wraps the basic Read method.
//
// Read reads up to len(p) bytes into p. It returns the number of bytes
// read and any error encountered. Even if Read returns n < len(p),
// read (0 <= n <= len(p)) and any error encountered.
// Even if Read returns n < len(p),
// it may use all of p as scratch space during the call.
// If some data is available but not len(p) bytes, Read conventionally
// returns what is available rather than block waiting for more.
...
...
@@ -43,6 +44,11 @@ type Reader interface {
}
// Writer is the interface that wraps the basic Write method.
//
// Write writes len(p) bytes from p to the underlying data stream.
// It returns the number of bytes written from p (0 <= n <= len(p))
// and any error encountered that caused the write to stop early.
// Write must return a non-nil error if it returns n < len(p).
type
Writer
interface
{
Write
(
p
[]
byte
)
(
n
int
,
err
os
.
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