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

Issue 4129042: code review 4129042: net: There's no need for prefixBefore() function.

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by ola
Modified:
1 year, 6 months ago
Reviewers:
rsc
CC:
rsc, golang-dev
Visibility:
Public.

Description

net: There's no need for prefixBefore() function. net or netProto argument are a choice of constants strings. It's not necessary to search a prefix in it. Actual code permit to write 'Dial("tcp:foobarbazquux", "", host) which may lead to confusion. ListenPacket() is modified to permit a net:proto string

Patch Set 1 : code review 4129042: net: There's no need for prefixBefore() function. #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -23 lines) Patch
M src/pkg/net/dial.go View 1 3 chunks +17 lines, -11 lines 0 comments Download
M src/pkg/net/iprawsock.go View 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/net/parse.go View 1 chunk +0 lines, -10 lines 0 comments Download

Messages

Total messages: 12
ola
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 3 months ago (2011-02-01 16:09:16 UTC) #1
rsc
It's not true that prefixBefore is unused. Look at ipraw_test.go, which calls ListenIP on "ip4:icmp". ...
14 years, 3 months ago (2011-02-01 19:16:52 UTC) #2
ola
On Tue, Feb 1, 2011 at 8:16 PM, Russ Cox <rsc@golang.org> wrote: > It's not ...
14 years, 3 months ago (2011-02-01 21:36:53 UTC) #3
rsc
On Tue, Feb 1, 2011 at 16:36, Olivier ANTOINE <olivier.antoine@gmail.com> wrote: > On Tue, Feb ...
14 years, 3 months ago (2011-02-01 21:44:24 UTC) #4
ola
On Tue, Feb 1, 2011 at 10:44 PM, Russ Cox <rsc@golang.org> wrote: > On Tue, ...
14 years, 3 months ago (2011-02-02 09:58:29 UTC) #5
rsc
> Is it allowed ? The documentation for this function states that the "network > ...
14 years, 3 months ago (2011-02-09 05:29:10 UTC) #6
ola
*** Abandoned ***
14 years, 3 months ago (2011-02-10 16:46:57 UTC) #7
ola
On 2011/02/09 05:29:10, rsc wrote: > > Is it allowed ? The documentation for this ...
14 years, 3 months ago (2011-02-10 16:51:55 UTC) #8
ola
Hello golang-dev@googlegroups.com, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 3 months ago (2011-02-10 18:43:21 UTC) #9
rsc
LGTM
14 years, 3 months ago (2011-02-11 19:58:52 UTC) #10
rsc
LGTM But please complete a CLA as described at http://golang.org/doc/contribute.html#copyright Thanks.
14 years, 3 months ago (2011-02-11 20:00:03 UTC) #11
rsc
14 years, 3 months ago (2011-02-16 20:03:51 UTC) #12
*** Submitted as 24f5f929d319 ***

net: reject invalid net:proto network names

R=rsc
CC=golang-dev
http://codereview.appspot.com/4129042

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