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

Issue 217088: code review 217088: path: add Match (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by rsc
Modified:
14 years, 2 months ago
Reviewers:
CC:
eridius, r, rog, golang-dev
Visibility:
Public.

Description

path: add Match

Patch Set 1 #

Patch Set 2 : code review 217088: path: add Match #

Total comments: 15

Patch Set 3 : code review 217088: path: add Match #

Total comments: 11

Patch Set 4 : code review 217088: path: add Match #

Patch Set 5 : code review 217088: path: add Match #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -0 lines) Patch
M src/pkg/path/Makefile View 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/path/match.go View 1 2 3 1 chunk +197 lines, -0 lines 0 comments Download
A src/pkg/path/match_test.go View 1 2 3 4 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 31
rsc
Hello eridius, r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 2 months ago (2010-02-22 23:55:07 UTC) #1
r
http://codereview.appspot.com/217088/diff/1001/1003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/1001/1003#newcode17 src/pkg/path/match.go:17: // '[' [ '^' ] character-ranges ']' character class ...
14 years, 2 months ago (2010-02-23 00:14:03 UTC) #2
rsc
> {,} too please even though it looks like one, {} is not a pattern. ...
14 years, 2 months ago (2010-02-23 00:19:47 UTC) #3
rsc
will address the rest of the comments later. i admit to dodging the corner cases ...
14 years, 2 months ago (2010-02-23 00:20:32 UTC) #4
r2
On Feb 23, 2010, at 11:19 AM, Russ Cox wrote: >> {,} too please > ...
14 years, 2 months ago (2010-02-23 00:22:45 UTC) #5
r2
On Feb 23, 2010, at 11:20 AM, Russ Cox wrote: > will address the rest ...
14 years, 2 months ago (2010-02-23 00:22:59 UTC) #6
eridius
http://codereview.appspot.com/217088/diff/1001/1004 File src/pkg/path/match_test.go (right): http://codereview.appspot.com/217088/diff/1001/1004#newcode15 src/pkg/path/match_test.go:15: MatchTest{"abc", "abc", true}, On 2010/02/23 00:14:03, r wrote: > ...
14 years, 2 months ago (2010-02-23 00:39:03 UTC) #7
eridius
http://codereview.appspot.com/217088/diff/1001/1003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/1001/1003#newcode15 src/pkg/path/match.go:15: // '?' matches any single character This should also ...
14 years, 2 months ago (2010-02-23 01:03:18 UTC) #8
rsc
> http://codereview.appspot.com/217088/diff/1001/1003#newcode15 > src/pkg/path/match.go:15: // '?' matches any single > character > This should also ...
14 years, 2 months ago (2010-02-23 01:09:37 UTC) #9
eridius
On Feb 22, 2010, at 5:09 PM, Russ Cox wrote: >> http://codereview.appspot.com/217088/diff/1001/1003#newcode17 >> src/pkg/path/match.go:17: // ...
14 years, 2 months ago (2010-02-23 01:18:16 UTC) #10
rog
On 23 February 2010 01:09, Russ Cox <rsc@golang.org> wrote: >> http://codereview.appspot.com/217088/diff/1001/1003#newcode15 >> src/pkg/path/match.go:15: // '?' ...
14 years, 2 months ago (2010-02-23 11:13:23 UTC) #11
rog
http://codereview.appspot.com/217088/diff/1001/1003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/1001/1003#newcode64 src/pkg/path/match.go:64: i++ this will cause a crash if the \ ...
14 years, 2 months ago (2010-02-23 11:45:30 UTC) #12
eridius
On Feb 23, 2010, at 3:13 AM, roger peppe wrote: > it's probably too late, ...
14 years, 2 months ago (2010-02-23 20:54:30 UTC) #13
eridius
http://codereview.appspot.com/217088/diff/1001/1003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/1001/1003#newcode64 src/pkg/path/match.go:64: i++ On 2010/02/23 11:45:30, rog wrote: > this will ...
14 years, 2 months ago (2010-02-23 20:56:32 UTC) #14
rog
http://codereview.appspot.com/217088/diff/1001/1003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/1001/1003#newcode64 src/pkg/path/match.go:64: i++ On 2010/02/23 20:56:34, eridius wrote: > On 2010/02/23 ...
14 years, 2 months ago (2010-02-24 11:04:11 UTC) #15
rog
On 24 February 2010 11:04, <rogpeppe@gmail.com> wrote: > erm, i still think it will crash. ...
14 years, 2 months ago (2010-02-24 15:07:59 UTC) #16
eridius
http://codereview.appspot.com/217088/diff/1001/1003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/1001/1003#newcode64 src/pkg/path/match.go:64: i++ On 2010/02/24 11:04:12, rog wrote: > On 2010/02/23 ...
14 years, 2 months ago (2010-02-24 21:55:13 UTC) #17
rsc
Please take another look. I have addressed all comments, expanded the test suite, and documented ...
14 years, 2 months ago (2010-02-24 23:04:46 UTC) #18
r
http://codereview.appspot.com/217088/diff/4001/3003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/4001/3003#newcode26 src/pkg/path/match.go:26: // '\\' c matches character c i think this ...
14 years, 2 months ago (2010-02-24 23:49:54 UTC) #19
rsc
http://codereview.appspot.com/217088/diff/4001/3003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/4001/3003#newcode26 src/pkg/path/match.go:26: // '\\' c matches character c On 2010/02/24 23:49:54, ...
14 years, 2 months ago (2010-02-25 00:03:13 UTC) #20
rsc
Hello eridius, r, rog (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 2 months ago (2010-02-25 00:03:29 UTC) #21
r
LGTM http://codereview.appspot.com/217088/diff/4001/3003 File src/pkg/path/match.go (right): http://codereview.appspot.com/217088/diff/4001/3003#newcode83 src/pkg/path/match.go:83: if i+1 < len(pattern) { thanks, a comment ...
14 years, 2 months ago (2010-02-25 00:06:07 UTC) #22
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=a91149da5703 *** path: add Match R=eridius, r, rog CC=golang-dev http://codereview.appspot.com/217088
14 years, 2 months ago (2010-02-25 00:11:24 UTC) #23
eridius
Oh crud, I was still reviewing the previous patch. Is it worth commenting on the ...
14 years, 2 months ago (2010-02-25 00:14:40 UTC) #24
r2
On Feb 25, 2010, at 11:14 AM, Kevin Ballard wrote: > Oh crud, I was ...
14 years, 2 months ago (2010-02-25 00:15:48 UTC) #25
eridius
Ok, I'll go move my draft comments to patchset 5, figure out which ones are ...
14 years, 2 months ago (2010-02-25 00:18:40 UTC) #26
r2
On Feb 25, 2010, at 11:18 AM, Kevin Ballard wrote: > Ok, I'll go move ...
14 years, 2 months ago (2010-02-25 00:19:47 UTC) #27
eridius
Some of them are no longer applicable, and I was putting some actual code in ...
14 years, 2 months ago (2010-02-25 00:22:01 UTC) #28
eridius
Acutally, since all of my comments that aren't about the - and ] edge cases ...
14 years, 2 months ago (2010-02-25 00:33:51 UTC) #29
eridius
Uh oh, turns out there's a fairly significant bug, illustrated by the following case path.Match("*x", ...
14 years, 2 months ago (2010-02-25 09:51:22 UTC) #30
eridius
14 years, 2 months ago (2010-02-25 10:11:43 UTC) #31
Ok, I've submitted a new change 223050 that fixes this issue.

-Kevin Ballard

On Feb 25, 2010, at 1:51 AM, Kevin Ballard wrote:

> Uh oh, turns out there's a fairly significant bug, illustrated by the
following case
> 
> path.Match("*x", "xxx")
> 
> This returns false. The problem is * matches non-greedily, but if the name
isn't exhausted, the last segment is not re-tried at the next position. I'll
look into fixing it, but I thought I should make you aware of the issue first.
> 
> -Kevin Ballard
> 
> On Feb 24, 2010, at 4:11 PM, rsc@golang.org wrote:
> 
>> *** Submitted as
>> http://code.google.com/p/go/source/detail?r=a91149da5703 ***
>> 
>> path: add Match
>> 
>> R=eridius, r, rog
>> CC=golang-dev
>> http://codereview.appspot.com/217088
>> 
>> 
>> http://codereview.appspot.com/217088/show
>> 
> 
> -- 
> Kevin Ballard
> http://kevin.sb.org
> kevin@sb.org
> http://www.tildesoft.com
> 
> 
> 

-- 
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com



Sign in to reply to this message.

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