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

Issue 1764043: code review 1764043: io: MultiReader and MultiWriter (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by brad_danga_com
Modified:
13 years, 9 months ago
Reviewers:
rsc1, adg, r2
CC:
adg, rsc, r, gri, golang-dev
Visibility:
Public.

Description

io: MultiReader and MultiWriter Little helpers I've found useful.

Patch Set 1 #

Patch Set 2 : code review 1764043: io: MultiReader and MultiWriter #

Patch Set 3 : code review 1764043: io: MultiReader and MultiWriter #

Total comments: 8

Patch Set 4 : code review 1764043: io: MultiReader and MultiWriter #

Total comments: 6

Patch Set 5 : code review 1764043: io: MultiReader and MultiWriter #

Total comments: 1

Patch Set 6 : code review 1764043: io: MultiReader and MultiWriter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -0 lines) Patch
M src/pkg/io/Makefile View 1 1 chunk +2 lines, -0 lines 0 comments Download
A src/pkg/io/multi_reader.go View 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
A src/pkg/io/multi_reader_test.go View 3 4 1 chunk +58 lines, -0 lines 0 comments Download
A src/pkg/io/multi_writer.go View 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A src/pkg/io/multi_writer_test.go View 3 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 24
brad_danga_com
Hello adg, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 9 months ago (2010-07-27 23:00:54 UTC) #1
brad_danga_com
Hello adg, rsc (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2010-07-27 23:02:38 UTC) #2
r
these are really nice. my comments are all minor http://codereview.appspot.com/1764043/diff/6001/7002 File src/pkg/io/multi_reader.go (right): http://codereview.appspot.com/1764043/diff/6001/7002#newcode39 src/pkg/io/multi_reader.go:39: ...
13 years, 9 months ago (2010-07-28 00:03:48 UTC) #3
adg
LGTM except: http://codereview.appspot.com/1764043/diff/6001/7004 File src/pkg/io/multi_writer.go (right): http://codereview.appspot.com/1764043/diff/6001/7004#newcode18 src/pkg/io/multi_writer.go:18: if err != nil { if ew ...
13 years, 9 months ago (2010-07-28 00:31:40 UTC) #4
brad_danga_com
Hello adg, rsc, r (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2010-07-28 03:46:38 UTC) #5
r2
LGTM anyone else?
13 years, 9 months ago (2010-07-28 04:07:15 UTC) #6
rsc1
http://codereview.appspot.com/1764043/diff/15001/16002 File src/pkg/io/multi_reader.go (right): http://codereview.appspot.com/1764043/diff/15001/16002#newcode15 src/pkg/io/multi_reader.go:15: func (cr *multiReader) Read(p []byte) (n int, err os.Error) ...
13 years, 9 months ago (2010-07-28 04:23:27 UTC) #7
gri
FYI http://codereview.appspot.com/1764043/diff/15001/16002 File src/pkg/io/multi_reader.go (right): http://codereview.appspot.com/1764043/diff/15001/16002#newcode7 src/pkg/io/multi_reader.go:7: import ( perhaps remove the ()'s http://codereview.appspot.com/1764043/diff/15001/16004 File ...
13 years, 9 months ago (2010-07-28 04:28:08 UTC) #8
adg
LGTM On 28 July 2010 13:46, <bradfitz@gmail.com> wrote: > Hello adg, rsc, r (cc: golang-dev@googlegroups.com), ...
13 years, 9 months ago (2010-07-28 04:28:29 UTC) #9
brad_danga_com
Hello adg, rsc, r, gri (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2010-07-28 08:00:13 UTC) #10
dangabrad
I think I've addressed all the comments, notably Russ's about not looping trying to fill ...
13 years, 9 months ago (2010-07-28 08:02:54 UTC) #11
rsc1
i'm sorry for bikeshedding this but i think you can simplify the control flow of ...
13 years, 9 months ago (2010-07-28 08:35:50 UTC) #12
brad_danga_com
Hello adg, rsc, r, gri (cc: golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 9 months ago (2010-07-28 15:15:19 UTC) #13
bradfitzgoog
Agreed, much better with your suggestions. Sorry I missed the multi_writer local variable one earlier. ...
13 years, 9 months ago (2010-07-28 15:21:19 UTC) #14
dangabrad
Agreed, much better with your suggestions. Sorry I missed the multi_writer local variable one earlier. ...
13 years, 9 months ago (2010-07-28 15:35:34 UTC) #15
rsc1
LGTM
13 years, 9 months ago (2010-07-28 18:28:18 UTC) #16
rsc
thanks again; these are nice little gems.
13 years, 9 months ago (2010-07-28 18:28:51 UTC) #17
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=339a08a7dc69 *** io: MultiReader and MultiWriter Little helpers I've found useful. R=adg, ...
13 years, 9 months ago (2010-07-28 18:30:06 UTC) #18
rog
[sorry for the late response to this - i've been largely offline for a while] ...
13 years, 9 months ago (2010-08-02 17:01:48 UTC) #19
r2
On 03/08/2010, at 3:01 AM, roger peppe wrote: > one other minor nit: wouldn't multireader.go ...
13 years, 9 months ago (2010-08-02 20:08:27 UTC) #20
rsc
various disconnected observations If you're going to shuffle things I'd just put them both into ...
13 years, 9 months ago (2010-08-02 21:12:57 UTC) #21
r2
that all sounds good. maybe i'll just do the merge into one file as one ...
13 years, 9 months ago (2010-08-02 21:41:26 UTC) #22
rog
On 2 August 2010 22:12, Russ Cox <rsc@golang.org> wrote: > If MultiWriter does return an ...
13 years, 9 months ago (2010-08-03 08:33:52 UTC) #23
rsc
13 years, 9 months ago (2010-08-03 20:16:57 UTC) #24
>> I wonder if the error list concept is worth
>> putting in os as an implementation of os.Error.
>
> i think this is a good idea, but i'm not sure
> it's exactly what is needed here. an important
> (as i see it) aspect to the error returned
> from MultiWriter.Write is that you can
> tell which stream yielded the error.
> this makes it possible to, for instance,
> attach a correct file name to the error message.
> it looks like ErrorList assumes that it's
> densely filled with errors, and that having
> gaps might break things. but maybe it's
> ok anyway, as long as ErrorList.Error scans
> for a non-nil error rather than using len().

i missed that about the multierror.
seems a bit overengineered really
but i suppose it's fine.  that wouldn't
go into package os.

russ
Sign in to reply to this message.

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