Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(969)

Issue 9952044: code review 9952044: os: return io.EOF from windows ReadAt as documented (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by brainman
Modified:
10 years, 9 months ago
Reviewers:
r, peterGo
CC:
golang-dev, r, pja, peterGo
Visibility:
Public.

Description

os: return io.EOF from windows ReadAt as documented Fixes issue 5619.

Patch Set 1 #

Patch Set 2 : diff -r 60e04bb0d8b9 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 4aa7943034c5 https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 4 : diff -r 3bd0f5144c86 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -0 lines) Patch
M src/pkg/os/file_windows.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/os/os_test.go View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M src/pkg/syscall/ztypes_windows.go View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5
brainman
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 9 months ago (2013-06-07 02:21:22 UTC) #1
r
LGTM https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/os_test.go File src/pkg/os/os_test.go (right): https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/os_test.go#newcode1127 src/pkg/os/os_test.go:1127: return unnecessary return
10 years, 9 months ago (2013-06-07 15:17:29 UTC) #2
pja
https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/file_windows.go File src/pkg/os/file_windows.go (right): https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/file_windows.go#newcode317 src/pkg/os/file_windows.go:317: return 0, nil io.EOF ?
10 years, 9 months ago (2013-06-08 12:18:38 UTC) #3
peterGo
LGTM Fix the return values comment so that it matches the code. https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/file_windows.go File src/pkg/os/file_windows.go ...
10 years, 9 months ago (2013-06-08 22:20:40 UTC) #4
brainman
10 years, 9 months ago (2013-06-10 09:14:50 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=9b1143bb425e ***

os: return io.EOF from windows ReadAt as documented

Fixes issue 5619.

R=golang-dev, r, peter.armitage, go.peter.90
CC=golang-dev
https://codereview.appspot.com/9952044

https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/file_windows.go
File src/pkg/os/file_windows.go (right):

https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/file_windows.go#n...
src/pkg/os/file_windows.go:317: return 0, nil
On 2013/06/08 12:18:38, pja wrote:
> io.EOF ?

Sure, I could return io.EOF here. But I would like to be consistent with the
rest of code here. syscall.ReadFile returns (0, nil) on end-of-file. With
exception of when it returns syscall.ERROR_HANDLE_EOF (as we discovered). So I
will just replace syscall.ERROR_HANDLE_EOF with returned (0, nil) so it looks
like syscall.ERROR_HANDLE_EOF have never happened.

https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/os_test.go
File src/pkg/os/os_test.go (right):

https://codereview.appspot.com/9952044/diff/4001/src/pkg/os/os_test.go#newcod...
src/pkg/os/os_test.go:1127: return
Removed.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b