Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: duplicated code of resolution of hosts in internetAddrList #20767

Closed
AlmogBaku opened this issue Jun 23, 2017 · 3 comments
Closed

net: duplicated code of resolution of hosts in internetAddrList #20767

AlmogBaku opened this issue Jun 23, 2017 · 3 comments

Comments

@AlmogBaku
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

master

What did you do?

Resolver. internetAddrList() trying first to resolve the host as IPv4 then as IPv6 and only then to parse it with Resolver. LookupIPAddr(). Although, that's exactly what Resolver. LookupIPAddr() do anyway.

if ip := parseIPv4(host); ip != nil {

What did you expect to see?

Resolver. internetAddrList() should reuse the code by resolving the host only by Resolver. LookupIPAddr()

@AlmogBaku AlmogBaku changed the title Duplication of lookup for hosts Duplicated code of resolution of hosts in internetAddrList Jun 23, 2017
@bradfitz bradfitz changed the title Duplicated code of resolution of hosts in internetAddrList net: duplicated code of resolution of hosts in internetAddrList Jun 23, 2017
@bradfitz
Copy link
Contributor

/cc @mikioh

@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 23, 2017
@bradfitz bradfitz added this to the Go1.10 milestone Jun 23, 2017
@mikioh
Copy link
Contributor

mikioh commented Jun 25, 2017

I think it's fine to consolidate the code with the fix for #20790.

@mikioh mikioh removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 30, 2017
@mikioh mikioh modified the milestones: Go1.10, Unplanned Nov 25, 2017
@gopherbot
Copy link

Change https://golang.org/cl/79935 mentions this issue: net: Parse IPv6 address with zone using DefaultResolver.Lookup{Host,IPAddr}

@mikioh mikioh modified the milestones: Unplanned, Go1.11 Nov 29, 2017
@golang golang locked and limited conversation to collaborators Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants