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

Issue 8845043: code review 8845043: io: explain what (0,nil) means from Read (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by r
Modified:
11 years, 11 months ago
Reviewers:
CC:
golang-dev, dsymonds, bradfitz
Visibility:
Public.

Description

io: explain what (0,nil) means from Read Also add a new variable ErrNoProgress that io.Readers can use to report ineffectual Read calls. Fixes issue 5310.

Patch Set 1 #

Patch Set 2 : diff -r fa6a760fcc63 https://code.google.com/p/go/ #

Total comments: 3

Patch Set 3 : diff -r f5f3d54cfadf https://code.google.com/p/go/ #

Total comments: 1

Patch Set 4 : diff -r f5f3d54cfadf https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -0 lines) Patch
M src/pkg/io/io.go View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 12
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
11 years, 11 months ago (2013-04-18 00:42:53 UTC) #1
dsymonds
"should usually" seems awfully wishy washy for something so specific. Perhaps // The caller should ...
11 years, 11 months ago (2013-04-18 01:04:39 UTC) #2
bradfitz
I really don't like this. I don't think (0, nil) should be documented as equivalent ...
11 years, 11 months ago (2013-04-18 02:20:02 UTC) #3
r
I think bufio.Scanner is correct and io.Copy is wrong.
11 years, 11 months ago (2013-04-18 04:06:37 UTC) #4
r
Wow. We break the rules. in os.File.Read: if n == 0 && len(b) > 0 ...
11 years, 11 months ago (2013-04-18 04:18:39 UTC) #5
bradfitz
Elaborate. I disagree. If it's a stream and there are no message boundaries, zero just ...
11 years, 11 months ago (2013-04-18 04:18:55 UTC) #6
r
Hello golang-dev@googlegroups.com, dsymonds@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-04-18 04:31:54 UTC) #7
dsymonds
LGTM https://codereview.appspot.com/8845043/diff/7001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/8845043/diff/7001/src/pkg/io/io.go#newcode59 src/pkg/io/io.go:59: // Implementations of Read are discouraged from returning ...
11 years, 11 months ago (2013-04-18 04:52:00 UTC) #8
bradfitz
LGTM as-is https://codereview.appspot.com/8845043/diff/7001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/8845043/diff/7001/src/pkg/io/io.go#newcode59 src/pkg/io/io.go:59: // Implementations of Read are discouraged from ...
11 years, 11 months ago (2013-04-18 06:13:45 UTC) #9
r
Hello golang-dev@googlegroups.com, dsymonds@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-04-19 00:19:25 UTC) #10
bradfitz
https://codereview.appspot.com/8845043/diff/13001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/8845043/diff/13001/src/pkg/io/io.go#newcode37 src/pkg/io/io.go:37: // ErrNoProgress is returned by some implementations implementations of? ...
11 years, 11 months ago (2013-04-19 00:27:17 UTC) #11
r
11 years, 11 months ago (2013-04-19 00:36:28 UTC) #12
*** Submitted as https://code.google.com/p/go/source/detail?r=864889d2dcee ***

io: explain what (0,nil) means from Read
Also add a new variable ErrNoProgress that io.Readers can use to
report ineffectual Read calls.
Fixes issue 5310.

R=golang-dev, dsymonds, bradfitz
CC=golang-dev
https://codereview.appspot.com/8845043
Sign in to reply to this message.

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