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

Issue 170046: code review 170046: Added a few more tests suggested by rsc to strings_test... (Closed)

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

Description

bytes, strings: add new function Fields

Patch Set 1 #

Patch Set 2 : code review 170046: Add SplitWhite() to strings; splits its argument into a... #

Total comments: 6

Patch Set 3 : code review 170046: Add SplitSpace() to strings; splits its argument into a... #

Total comments: 6

Patch Set 4 : code review 170046: Add SplitSpace() to strings; splits its argument into a... #

Total comments: 5

Patch Set 5 : code review 170046: Add SplitSpace() to strings and bytes; splits its argum... #

Patch Set 6 : code review 170046: Add SplitSpace() to strings and bytes; splits its argum... #

Total comments: 2

Patch Set 7 : code review 170046: Changed SplitFields() to Fields(); Re-implemented strin... #

Patch Set 8 : code review 170046: Added a few more tests suggested by rsc to strings_test... #

Patch Set 9 : code review 170046: bytes, strings: add new function Fields #

Total comments: 5

Patch Set 10 : code review 170046: bytes, strings: add new function Fields #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -0 lines) Patch
M src/pkg/bytes/bytes.go View 5 6 7 8 9 1 chunk +38 lines, -0 lines 0 comments Download
M src/pkg/bytes/bytes_test.go View 5 6 7 8 9 1 chunk +30 lines, -0 lines 0 comments Download
M src/pkg/strings/strings.go View 1 2 3 4 5 6 7 8 9 1 chunk +34 lines, -0 lines 0 comments Download
M src/pkg/strings/strings_test.go View 1 2 3 4 5 6 7 8 9 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 29
aam
Hello rsc, I'd like you to review the following change.
15 years, 3 months ago (2009-12-09 22:47:24 UTC) #1
rsc
Once this one is ready we'll want to put the same code in bytes. http://codereview.appspot.com/170046/diff/1001/6 ...
15 years, 3 months ago (2009-12-11 19:27:52 UTC) #2
rsc
+golang-dev
15 years, 3 months ago (2009-12-11 19:28:07 UTC) #3
aam
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
15 years, 3 months ago (2009-12-11 20:28:16 UTC) #4
rsc
http://codereview.appspot.com/170046/diff/2004/3002 File src/pkg/strings/strings.go (right): http://codereview.appspot.com/170046/diff/2004/3002#newcode140 src/pkg/strings/strings.go:140: inSpace := false; I suggest making this loop the ...
15 years, 3 months ago (2009-12-11 20:40:33 UTC) #5
aam
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
15 years, 3 months ago (2009-12-11 21:34:46 UTC) #6
rsc
http://codereview.appspot.com/170046/diff/2004/3002 File src/pkg/strings/strings.go (right): http://codereview.appspot.com/170046/diff/2004/3002#newcode155 src/pkg/strings/strings.go:155: for i := 0; i < len(s) && na ...
15 years, 3 months ago (2009-12-11 21:40:06 UTC) #7
aam
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
15 years, 3 months ago (2009-12-11 22:14:44 UTC) #8
r
http://codereview.appspot.com/170046/diff/2009/2012 File src/pkg/strings/strings.go (right): http://codereview.appspot.com/170046/diff/2009/2012#newcode139 src/pkg/strings/strings.go:139: func SplitFields(s string) []string { i would call this ...
15 years, 3 months ago (2009-12-14 02:34:22 UTC) #9
phf
I think "Fields" will be misleading to some extent. This is only for whitespace-separated strings, ...
15 years, 3 months ago (2009-12-14 15:58:00 UTC) #10
aam
Hello rsc, r, phf (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
15 years, 3 months ago (2009-12-14 16:37:38 UTC) #11
aam
I've made the changes requested by Rob. I don't feel strongly about the name either ...
15 years, 3 months ago (2009-12-14 16:46:18 UTC) #12
phf
On Mon, Dec 14, 2009 at 11:46 AM, andrey mirtchovski <mirtchovski@gmail.com> wrote: > split across ...
15 years, 3 months ago (2009-12-14 16:54:27 UTC) #13
rsc
This looks fine but I still want to define and test the behavior when there ...
15 years, 3 months ago (2009-12-14 19:10:30 UTC) #14
r2
On 15/12/2009, at 2:58 AM, peter.hans.froehlich@gmail.com wrote: > I think "Fields" will be misleading to ...
15 years, 3 months ago (2009-12-14 19:30:02 UTC) #15
aam
> This looks fine but I still want to define and test > the behavior ...
15 years, 3 months ago (2009-12-14 19:34:39 UTC) #16
aam
> I'd rather see something like Plan 9's tokenize. A more general interface > like ...
15 years, 3 months ago (2009-12-14 19:37:11 UTC) #17
rsc
Please add some simpler tests too: "" " " " \t " " abc " ...
15 years, 3 months ago (2009-12-14 20:00:22 UTC) #18
rsc
Fields as currently defined handles most inputs well. Moving to tokenize forces a particular quoting ...
15 years, 3 months ago (2009-12-14 20:03:46 UTC) #19
r2
On 15/12/2009, at 7:03 AM, Russ Cox wrote: > Fields as currently defined handles most ...
15 years, 3 months ago (2009-12-14 20:07:02 UTC) #20
aam
Hello rsc, r, phf (cc: golang-dev@googlegroups.com), I'd like you to review the following change.
15 years, 3 months ago (2009-12-14 22:09:42 UTC) #21
rsc
By the way, the change description is supposed to be what the change log entry ...
15 years, 3 months ago (2009-12-14 22:45:23 UTC) #22
rsc
> Instead of changing the description and running > hg mail, you can just reply ...
15 years, 3 months ago (2009-12-14 22:46:12 UTC) #23
aam
> Please do run hg change one more time to edit > the description to ...
15 years, 3 months ago (2009-12-14 23:41:12 UTC) #24
r
http://codereview.appspot.com/170046/diff/8001/8002 File src/pkg/bytes/bytes.go (right): http://codereview.appspot.com/170046/diff/8001/8002#newcode166 src/pkg/bytes/bytes.go:166: // Fields splits the array s around each instance ...
15 years, 3 months ago (2009-12-15 00:24:41 UTC) #25
aam
PTAL Incorporated latest comments, no other changes.
15 years, 3 months ago (2009-12-15 00:57:30 UTC) #26
r
the code still seems too complicated to me but logically ok. i'll let rsc decide ...
15 years, 3 months ago (2009-12-15 00:59:57 UTC) #27
rsc
LGTM thanks You will probably want to run cd $GOROOT/src/pkg hg revert bytes strings hg ...
15 years, 3 months ago (2009-12-16 05:00:52 UTC) #28
rsc
15 years, 3 months ago (2009-12-16 05:09:59 UTC) #29
*** Submitted as http://code.google.com/p/go/source/detail?r=251d2be5c71e ***

bytes, strings: add new function Fields

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

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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