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

Issue 3008041: code review 3008041: path: Windows support for Split (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years ago by bsiegert
Modified:
15 years, 12 months ago
Reviewers:
CC:
r, rsc, peterGo, r2, brainman, golang-dev
Visibility:
Public.

Description

path: Windows support for Split Make Split work on backslashes as well as on slashes under Windows and support the "C:filename" special case. Also add corresponding tests.

Patch Set 1 #

Patch Set 2 : code review 3008041: path: Windows support for Split #

Total comments: 2

Patch Set 3 : code review 3008041: path: Windows support for Split #

Total comments: 2

Patch Set 4 : code review 3008041: path: Windows support for Split #

Total comments: 10

Patch Set 5 : code review 3008041: path: Windows support for Split #

Total comments: 10

Patch Set 6 : code review 3008041: path: Windows support for Split #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -8 lines) Patch
M src/pkg/path/Makefile View 1 chunk +17 lines, -0 lines 1 comment Download
M src/pkg/path/path.go View 1 2 3 4 1 chunk +4 lines, -8 lines 0 comments Download
M src/pkg/path/path_test.go View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download
A src/pkg/path/path_unix.go View 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A src/pkg/path/path_windows.go View 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 29
bsiegert
Hello r, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
16 years ago (2010-11-09 20:38:55 UTC) #1
r
http://codereview.appspot.com/3008041/diff/2001/src/pkg/path/path.go File src/pkg/path/path.go (right): http://codereview.appspot.com/3008041/diff/2001/src/pkg/path/path.go#newcode112 src/pkg/path/path.go:112: if path[i] == '/' || (runtime.GOOS == "windows" && ...
16 years ago (2010-11-09 21:16:18 UTC) #2
peterGo
Windows specific code can easily become a ball-and-chain for Go. This is a patch for ...
16 years ago (2010-11-10 03:25:57 UTC) #3
bsiegert
On Wed, Nov 10, 2010 at 04:25, <go.peter.90@gmail.com> wrote: > Windows specific code can easily ...
16 years ago (2010-11-10 09:40:48 UTC) #4
r2
On Nov 10, 2010, at 1:40 AM, Benny Siegert wrote: > On Wed, Nov 10, ...
16 years ago (2010-11-10 17:40:51 UTC) #5
peterGo
On 2010/11/10 09:40:48, bsiegert wrote: > I would prefer for these constants to reside in ...
16 years ago (2010-11-10 19:04:46 UTC) #6
peterGo
On 2010/11/10 17:40:51, r2 wrote: > On Nov 10, 2010, at 1:40 AM, Benny Siegert ...
16 years ago (2010-11-10 21:39:23 UTC) #7
brainman
On 2010/11/10 03:25:57, PeterGo wrote: > Windows specific code can easily become a ball-and-chain for ...
16 years ago (2010-11-11 02:01:25 UTC) #8
peterGo
On 2010/11/11 02:01:25, brainman wrote: > couldn't we just create an os.IsPathSeparator(ch int) or something ...
16 years ago (2010-11-11 19:50:08 UTC) #9
peterGo
Alex, Here's the full path.Split() function patch, including the missing strings.LastIndexAny() function, that I use ...
16 years ago (2010-11-12 20:04:20 UTC) #10
brainman
On 2010/11/12 20:04:20, PeterGo wrote: > Here's the full path.Split() function patch, including the missing ...
16 years ago (2010-11-12 22:53:27 UTC) #11
bsiegert
Hello r, rsc, PeterGo, r2, brainman (cc: golang-dev@googlegroups.com), Please take another look.
16 years ago (2010-11-13 12:23:24 UTC) #12
peterGo
http://codereview.appspot.com/3008041/diff/17001/src/pkg/path/path.go File src/pkg/path/path.go (right): http://codereview.appspot.com/3008041/diff/17001/src/pkg/path/path.go#newcode109 src/pkg/path/path.go:109: func Split(path string) (dir, file string) { The first ...
16 years ago (2010-11-13 22:23:36 UTC) #13
bsiegert
Hello r, rsc, PeterGo, r2, brainman (cc: golang-dev@googlegroups.com), Please take another look.
16 years ago (2010-11-14 10:17:24 UTC) #14
bsiegert
http://codereview.appspot.com/3008041/diff/17001/src/pkg/path/path.go File src/pkg/path/path.go (right): http://codereview.appspot.com/3008041/diff/17001/src/pkg/path/path.go#newcode109 src/pkg/path/path.go:109: func Split(path string) (dir, file string) { On 2010/11/13 ...
16 years ago (2010-11-14 10:20:13 UTC) #15
bsiegert
http://codereview.appspot.com/3008041/diff/2001/src/pkg/path/path.go File src/pkg/path/path.go (right): http://codereview.appspot.com/3008041/diff/2001/src/pkg/path/path.go#newcode112 src/pkg/path/path.go:112: if path[i] == '/' || (runtime.GOOS == "windows" && ...
16 years ago (2010-11-14 10:20:42 UTC) #16
peterGo
http://codereview.appspot.com/3008041/diff/23001/src/pkg/path/path_test.go File src/pkg/path/path_test.go (right): http://codereview.appspot.com/3008041/diff/23001/src/pkg/path/path_test.go#newcode87 src/pkg/path/path_test.go:87: var winsplittests = []SplitTest{ Go has two forms of ...
16 years ago (2010-11-14 16:24:59 UTC) #17
peterGo
http://codereview.appspot.com/3008041/diff/23001/src/pkg/path/path.go File src/pkg/path/path.go (right): http://codereview.appspot.com/3008041/diff/23001/src/pkg/path/path.go#newcode105 src/pkg/path/path.go:105: // Split splits path immediately following the final slash, ...
16 years ago (2010-11-14 22:27:36 UTC) #18
bsiegert
Hello r, rsc, PeterGo, r2, brainman (cc: golang-dev@googlegroups.com), Please take another look.
16 years ago (2010-11-15 09:47:12 UTC) #19
bsiegert
http://codereview.appspot.com/3008041/diff/23001/src/pkg/path/path.go File src/pkg/path/path.go (right): http://codereview.appspot.com/3008041/diff/23001/src/pkg/path/path.go#newcode105 src/pkg/path/path.go:105: // Split splits path immediately following the final slash, ...
16 years ago (2010-11-15 09:47:23 UTC) #20
peterGo
http://codereview.appspot.com/3008041/diff/32002/src/pkg/path/path_test.go File src/pkg/path/path_test.go (right): http://codereview.appspot.com/3008041/diff/32002/src/pkg/path/path_test.go#newcode90 src/pkg/path/path_test.go:90: {`C:\Windows`, `C:\\`, `Windows`}, On Windows, "FAIL: path.TestSplit." s/`C:\\`/`C:\`/
16 years ago (2010-11-15 16:45:22 UTC) #21
peterGo
http://codereview.appspot.com/3008041/diff/32002/src/pkg/path/path_unix.go File src/pkg/path/path_unix.go (right): http://codereview.appspot.com/3008041/diff/32002/src/pkg/path/path_unix.go#newcode1 src/pkg/path/path_unix.go:1: // Copyright 2009 The Go Authors. All rights reserved. ...
16 years ago (2010-11-15 22:22:49 UTC) #22
bsiegert
http://codereview.appspot.com/3008041/diff/32002/src/pkg/path/path_test.go File src/pkg/path/path_test.go (right): http://codereview.appspot.com/3008041/diff/32002/src/pkg/path/path_test.go#newcode90 src/pkg/path/path_test.go:90: {`C:\Windows`, `C:\\`, `Windows`}, On 2010/11/15 16:45:22, PeterGo wrote: > ...
16 years ago (2010-11-16 11:19:35 UTC) #23
bsiegert
Hello r, rsc, PeterGo, r2, brainman (cc: golang-dev@googlegroups.com), Please take another look.
16 years ago (2010-11-16 11:19:35 UTC) #24
brainman
LGTM
16 years ago (2010-11-17 00:30:28 UTC) #25
bsiegert
On Wed, Nov 17, 2010 at 01:30, <alex.brainman@gmail.com> wrote: > LGTM > > http://codereview.appspot.com/3008041/ Ping?
16 years ago (2010-11-23 08:23:46 UTC) #26
r
the code is fine. let me know if you want to change the Makefile. http://codereview.appspot.com/3008041/diff/35006/src/pkg/path/Makefile ...
16 years ago (2010-11-30 21:32:05 UTC) #27
brainman
On 2010/11/30 21:32:05, r wrote: > write something like > > ifeq ($(GOOS),windows) > GOFILES+=path_windows.go ...
16 years ago (2010-12-01 01:07:21 UTC) #28
r
16 years ago (2010-12-01 01:17:51 UTC) #29
*** Submitted as http://code.google.com/p/go/source/detail?r=d3e867d23e3e ***

path: Windows support for Split

Make Split work on backslashes as well as on slashes under Windows
and support the "C:filename" special case. Also add corresponding
tests.

R=r, rsc, PeterGo, r2, brainman
CC=golang-dev
http://codereview.appspot.com/3008041

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