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

Issue 176071: code review 176071: When the buffer is empty, reset b.off to the beginning ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 3 months ago by r
Modified:
15 years, 3 months ago
Reviewers:
cw
CC:
rsc, golang-dev
Visibility:
Public.

Description

When the buffer is empty, reset b.off to the beginning of the buffer to avoid growing unnecessarily.

Patch Set 1 #

Patch Set 2 : code review 176071: When the buffer is empty, reset b.off to the beginning ... #

Patch Set 3 : code review 176071: When the buffer is empty, reset b.off to the beginning ... #

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

Messages

Total messages: 9
r
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
15 years, 3 months ago (2009-12-14 00:58:17 UTC) #1
rsc
LGTM
15 years, 3 months ago (2009-12-14 02:09:45 UTC) #2
r
*** Submitted as http://code.google.com/p/go/source/detail?r=765872a1c7ae *** When the buffer is empty, reset b.off to the beginning ...
15 years, 3 months ago (2009-12-14 02:13:04 UTC) #3
cw
FWIW, when I submitted the shrink changes I had a version that did this and ...
15 years, 3 months ago (2009-12-14 06:28:08 UTC) #4
rsc
On Sun, Dec 13, 2009 at 22:28, <cw@f00f.org> wrote: > FWIW, when I submitted the ...
15 years, 3 months ago (2009-12-14 06:35:52 UTC) #5
cw
On Sun, Dec 13, 2009 at 10:35:49PM -0800, Russ Cox wrote: > This change is ...
15 years, 3 months ago (2009-12-14 06:44:16 UTC) #6
rsc
> In doing that I found I couldn't use fmt.Printf and friends (because > they ...
15 years, 3 months ago (2009-12-14 07:49:47 UTC) #7
cw
On Sun, Dec 13, 2009 at 11:49:40PM -0800, Russ Cox wrote: > I assume you ...
15 years, 3 months ago (2009-12-14 08:08:17 UTC) #8
rsc
15 years, 3 months ago (2009-12-14 08:50:12 UTC) #9
> right, which is why for debugging i have some quick and dirty itoa
> functions i dropped in place to log directly to an os.File
>
> i'm wondering if there is a better way

for debugging you can use the print builtin.

russ
Sign in to reply to this message.

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