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

Issue 87780046: code review 87780046: io: document that a Writer must not write to p (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by bradfitz
Modified:
10 years, 11 months ago
Reviewers:
r, gri, rsc
CC:
r, rsc, gri, joshlf13, golang-codereviews
Visibility:
Public.

Description

io: document that a Writer must not write to p Per golang-nuts question. Writing to p breaks other writers (e.g. io.MultiWriter). Make this explicit.

Patch Set 1 #

Patch Set 2 : diff -r 8e5787506b59 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 8e5787506b59 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 8e5787506b59 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 5 : diff -r 8e5787506b59 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 6 : diff -r b7951abc878e https://go.googlecode.com/hg/ #

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

Messages

Total messages: 19
bradfitz
Hello r@golang.org, rsc@golang.org, gri@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 11 months ago (2014-04-15 21:50:23 UTC) #1
r
https://codereview.appspot.com/87780046/diff/40001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/87780046/diff/40001/src/pkg/io/io.go#newcode77 src/pkg/io/io.go:77: // Write must not write to p. Write must ...
10 years, 11 months ago (2014-04-15 21:54:45 UTC) #2
joshlf13
On 2014/04/15 21:50:23, bradfitz wrote: > Hello mailto:r@golang.org, mailto:rsc@golang.org, mailto:gri@golang.org (cc: > mailto:golang-codereviews@googlegroups.com), > > ...
10 years, 11 months ago (2014-04-15 21:55:10 UTC) #3
bradfitz
I use the word "write" instead of "modify" because modify implies that it's okay to ...
10 years, 11 months ago (2014-04-15 21:58:31 UTC) #4
bradfitz
Hello r@golang.org, rsc@golang.org, gri@golang.org, joshlf13@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 11 months ago (2014-04-15 21:59:39 UTC) #5
gri
LGTM
10 years, 11 months ago (2014-04-15 22:10:31 UTC) #6
bradfitz
Rob? On Tue, Apr 15, 2014 at 3:10 PM, <gri@golang.org> wrote: > LGTM > > ...
10 years, 11 months ago (2014-04-15 22:11:59 UTC) #7
r
https://codereview.appspot.com/87780046/diff/60001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/87780046/diff/60001/src/pkg/io/io.go#newcode77 src/pkg/io/io.go:77: // Write must not write to the slice p. ...
10 years, 11 months ago (2014-04-15 22:49:58 UTC) #8
bradfitz
https://codereview.appspot.com/87780046/diff/60001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/87780046/diff/60001/src/pkg/io/io.go#newcode77 src/pkg/io/io.go:77: // Write must not write to the slice p. ...
10 years, 11 months ago (2014-04-15 22:55:55 UTC) #9
r
https://codereview.appspot.com/87780046/diff/60001/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/87780046/diff/60001/src/pkg/io/io.go#newcode77 src/pkg/io/io.go:77: // Write must not write to the slice p. ...
10 years, 11 months ago (2014-04-15 22:57:33 UTC) #10
rsc
I don't believe we have to answer every golang-nuts question in the docs. I don't ...
10 years, 11 months ago (2014-04-15 23:03:40 UTC) #11
bradfitz
I want docs. Users want docs. On Tue, Apr 15, 2014 at 4:03 PM, Russ ...
10 years, 11 months ago (2014-04-15 23:04:39 UTC) #12
bradfitz
Hello r@golang.org, rsc@golang.org, gri@golang.org, joshlf13@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 11 months ago (2014-04-15 23:08:06 UTC) #13
r
LGTM by which i mean, i hate this and would prefer we said nothing and ...
10 years, 11 months ago (2014-04-15 23:09:07 UTC) #14
r
THIS IS FOR ROT13??? reversing my LGTM On Tue, Apr 15, 2014 at 4:08 PM, ...
10 years, 11 months ago (2014-04-15 23:10:34 UTC) #15
r
Leaving for rsc.
10 years, 11 months ago (2014-04-15 23:10:56 UTC) #16
bradfitz
It was from our tour, was it not? It's a natural question to ask. I'm ...
10 years, 11 months ago (2014-04-15 23:11:55 UTC) #17
rsc
LGTM with edits below https://codereview.appspot.com/87780046/diff/10002/src/pkg/io/io.go File src/pkg/io/io.go (right): https://codereview.appspot.com/87780046/diff/10002/src/pkg/io/io.go#newcode76 src/pkg/io/io.go:76: // It must return a ...
10 years, 11 months ago (2014-04-16 00:09:21 UTC) #18
bradfitz
10 years, 11 months ago (2014-04-16 00:14:10 UTC) #19
*** Submitted as https://code.google.com/p/go/source/detail?r=c7065d3ad91a ***

io: document that a Writer must not write to p

Per golang-nuts question. Writing to p breaks
other writers (e.g. io.MultiWriter).

Make this explicit.

LGTM=gri, r, rsc
R=r, rsc, gri, joshlf13
CC=golang-codereviews
https://codereview.appspot.com/87780046
Sign in to reply to this message.

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