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

Issue 4244055: code review 4244055: net: drop laddr from Dial, cname from LookupHost; new f... (Closed)

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

Description

net: drop laddr from Dial, cname from LookupHost; new functions Drop laddr argument from Dial. Drop cname return from LookupHost. Add LookupIP, LookupCNAME, ParseCIDR, IP.Equal. Export SplitHostPort, JoinHostPort. Add AAAA (IPv6) support to host lookups. Preparations for implementing some of the lookups using cgo. ParseCIDR and IP.Equal are logically new in this CL but accidentally snuck into an earlier CL about unused labels that was in the same client. In crypto/tls, drop laddr from Dial to match net.

Patch Set 1 #

Patch Set 2 : diff -r 5ccb9b6f8cd1 https://go.googlecode.com/hg #

Patch Set 3 : diff -r 5ccb9b6f8cd1 https://go.googlecode.com/hg #

Patch Set 4 : diff -r 5ccb9b6f8cd1 https://go.googlecode.com/hg #

Patch Set 5 : diff -r 5ccb9b6f8cd1 https://go.googlecode.com/hg #

Patch Set 6 : diff -r 424b74bdf29e https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 7 : diff -r 424b74bdf29e https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r 424b74bdf29e https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 9 : diff -r 8b9c0b903333 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -145 lines) Patch
M src/pkg/crypto/tls/handshake_client_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/crypto/tls/tls.go View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M src/pkg/net/Makefile View 1 2 chunks +2 lines, -0 lines 0 comments Download
A src/pkg/net/cgo_stub.go View 1 2 1 chunk +21 lines, -0 lines 0 comments Download
M src/pkg/net/dial.go View 1 2 3 4 5 6 7 2 chunks +27 lines, -52 lines 0 comments Download
M src/pkg/net/dialgoogle_test.go View 1 2 3 4 5 3 chunks +10 lines, -3 lines 0 comments Download
M src/pkg/net/dnsclient.go View 1 2 3 4 5 5 chunks +71 lines, -9 lines 0 comments Download
M src/pkg/net/dnsmsg.go View 1 8 chunks +39 lines, -3 lines 0 comments Download
M src/pkg/net/hosts_test.go View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/net/ip.go View 1 2 3 4 5 6 2 chunks +32 lines, -19 lines 0 comments Download
M src/pkg/net/ip_test.go View 1 2 3 4 5 6 3 chunks +70 lines, -20 lines 0 comments Download
M src/pkg/net/iprawsock.go View 1 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/ipsock.go View 1 3 4 chunks +9 lines, -8 lines 0 comments Download
A src/pkg/net/lookup.go View 1 2 3 4 5 1 chunk +38 lines, -0 lines 0 comments Download
M src/pkg/net/net_test.go View 1 2 3 4 5 2 chunks +11 lines, -12 lines 0 comments Download
M src/pkg/net/port.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/net/server_test.go View 1 2 3 4 5 6 1 chunk +6 lines, -4 lines 0 comments Download
M src/pkg/net/sock.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/net/tcpsock.go View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M src/pkg/net/textproto/textproto.go View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/timeout_test.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/udpsock.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8
rsc
Hello golang-dev (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
6 years, 3 months ago (2011-03-16 16:14:53 UTC) #1
dsymonds
http://codereview.appspot.com/4244055/diff/15001/src/pkg/net/dial.go File src/pkg/net/dial.go (left): http://codereview.appspot.com/4244055/diff/15001/src/pkg/net/dial.go#oldcode35 src/pkg/net/dial.go:35: if raddr != "" { shouldn't raddr always be ...
6 years, 3 months ago (2011-03-16 16:22:05 UTC) #2
rsc
> http://codereview.appspot.com/4244055/diff/15001/src/pkg/net/lookup.go#newcode11 > src/pkg/net/lookup.go:11: // LookupHost looks up the given host using > the local ...
6 years, 3 months ago (2011-03-16 16:24:49 UTC) #3
rsc
> http://codereview.appspot.com/4244055/diff/15001/src/pkg/net/dial.go#oldcode35 > src/pkg/net/dial.go:35: if raddr != "" { > shouldn't raddr always be non-empty? ...
6 years, 3 months ago (2011-03-16 16:28:37 UTC) #4
adg
LGTM Perhaps mention that SyntaxError became ParseError in the change notes.
6 years, 3 months ago (2011-03-17 01:06:39 UTC) #5
rh
Nice. http://codereview.appspot.com/4244055/diff/21001/src/pkg/net/ip_test.go File src/pkg/net/ip_test.go (right): http://codereview.appspot.com/4244055/diff/21001/src/pkg/net/ip_test.go#newcode135 src/pkg/net/ip_test.go:135: } Worth testing bad values to SplitHostPort return ...
6 years, 3 months ago (2011-03-17 04:17:23 UTC) #6
rsc
On Wed, Mar 16, 2011 at 21:06, <adg@golang.org> wrote: > LGTM > > Perhaps mention ...
6 years, 3 months ago (2011-03-17 05:08:01 UTC) #7
rsc
6 years, 3 months ago (2011-03-29 03:28:45 UTC) #8
*** Submitted as http://code.google.com/p/go/source/detail?r=5db33d4b32f6 ***

net: drop laddr from Dial, cname from LookupHost; new functions

Drop laddr argument from Dial.

Drop cname return from LookupHost.

Add LookupIP, LookupCNAME, ParseCIDR, IP.Equal.
Export SplitHostPort, JoinHostPort.
Add AAAA (IPv6) support to host lookups.

Preparations for implementing some of the
lookups using cgo.

ParseCIDR and IP.Equal are logically new in this CL
but accidentally snuck into an earlier CL about unused
labels that was in the same client.

In crypto/tls, drop laddr from Dial to match net.

R=golang-dev, dsymonds, adg, rh
CC=golang-dev
http://codereview.appspot.com/4244055
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 80a51fa-tainted