Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Go
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Stiemerling
Go
Commits
c69d6345
Commit
c69d6345
authored
13 years ago
by
Russ Cox
Browse files
Options
Downloads
Patches
Plain Diff
os: make ReadAt comment clearer
Fixes #2486. R=golang-dev, hanwen CC=golang-dev
https://golang.org/cl/5417064
parent
11e73b89
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pkg/os/file.go
+2
-2
2 additions, 2 deletions
src/pkg/os/file.go
with
2 additions
and
2 deletions
src/pkg/os/file.go
+
2
−
2
View file @
c69d6345
...
...
@@ -70,8 +70,8 @@ func (file *File) Read(b []byte) (n int, err error) {
// ReadAt reads len(b) bytes from the File starting at byte offset off.
// It returns the number of bytes read and the error, if any.
//
EOF is signaled by a zero count with err set to io.EOF
.
//
ReadAt always returns a non-nil error when n != len(b)
.
//
ReadAt always returns a non-nil error when n < len(b)
.
//
At end of file, that error is io.EOF
.
func
(
file
*
File
)
ReadAt
(
b
[]
byte
,
off
int64
)
(
n
int
,
err
error
)
{
if
file
==
nil
{
return
0
,
EINVAL
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment