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

Issue 4625068: code review 4625068: io.WriteString: if the object has a WriteString method,... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by eds
Modified:
13 years, 9 months ago
Reviewers:
CC:
golang-dev, rsc, r2, Kyle C, r
Visibility:
Public.

Description

io.WriteString: if the object has a WriteString method, use it This avoids allocation when writing to bytes.Buffers and bufio.Writers, for example.

Patch Set 1 #

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

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

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

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

Total comments: 1

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

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

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

Messages

Total messages: 16
eds
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 9 months ago (2011-06-26 08:28:11 UTC) #1
rsc
I'm pretty skeptical. How often does this come up? Russ
13 years, 9 months ago (2011-06-27 13:55:32 UTC) #2
eds
On Tue, Jun 28, 2011 at 1:55 AM, Russ Cox <rsc@golang.org> wrote: > I'm pretty ...
13 years, 9 months ago (2011-06-27 20:17:23 UTC) #3
rsc
> Alternatively, I propose removing WriteString. Fine with me. Let's wait and see what Rob ...
13 years, 9 months ago (2011-06-27 20:20:52 UTC) #4
r2
On 28/06/2011, at 6:20 AM, Russ Cox wrote: >> Alternatively, I propose removing WriteString. > ...
13 years, 9 months ago (2011-06-27 21:39:27 UTC) #5
Kyle C
On Mon, Jun 27, 2011 at 2:39 PM, Rob 'Commander' Pike <r@google.com> wrote: > > ...
13 years, 9 months ago (2011-06-28 00:29:12 UTC) #6
r2
http://codereview.appspot.com/4639081
13 years, 9 months ago (2011-06-28 01:07:37 UTC) #7
eds
Hello golang-dev@googlegroups.com, rsc@golang.org, r@google.com, consalus@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-28 05:09:50 UTC) #8
r
http://codereview.appspot.com/4625068/diff/1004/src/pkg/io/io.go File src/pkg/io/io.go (right): http://codereview.appspot.com/4625068/diff/1004/src/pkg/io/io.go#newcode203 src/pkg/io/io.go:203: // WriteString must return a non-nil error if it ...
13 years, 9 months ago (2011-06-28 05:14:14 UTC) #9
eds
Hello golang-dev@googlegroups.com, rsc@golang.org, r@google.com, consalus@gmail.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-28 05:15:15 UTC) #10
r
the CL desc I see isn't right. have you updated it locally?
13 years, 9 months ago (2011-06-28 05:24:34 UTC) #11
eds
On Tue, Jun 28, 2011 at 5:24 PM, <r@golang.org> wrote: > the CL desc I ...
13 years, 9 months ago (2011-06-28 05:30:11 UTC) #12
r
it's good to provide actual information in the CL description. these descriptions are a matter ...
13 years, 9 months ago (2011-06-28 06:01:07 UTC) #13
eds
Hello golang-dev@googlegroups.com, rsc@golang.org, r@google.com, consalus@gmail.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-28 06:05:31 UTC) #14
r
LGTM
13 years, 9 months ago (2011-06-28 06:06:31 UTC) #15
r
13 years, 9 months ago (2011-06-28 06:10:45 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=5e7ad769e69f ***

io.WriteString: if the object has a WriteString method, use it

This avoids allocation when writing to bytes.Buffers and bufio.Writers, for
example.

R=golang-dev, rsc, r, consalus, r
CC=golang-dev
http://codereview.appspot.com/4625068

Committer: Rob Pike <r@golang.org>
Sign in to reply to this message.

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