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: misleading lookup error message #6324

Closed
gopherbot opened this issue Sep 4, 2013 · 3 comments
Closed

net: misleading lookup error message #6324

gopherbot opened this issue Sep 4, 2013 · 3 comments
Assignees
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 4, 2013

by fish@soundcloud.com:

If you look up a not fully qualified name via net.Lookup* functions and the name can't
be resolved, it will print the name as it was a fully qualified name.

Given you have the search path "example.com" and try to resolve
"foo": If "foo.example.com" can't be resolved, net prints:

        lookup foo.: no such host

Which is misleading because you expect it tried to resolve "foo." where it in
fact (as designed) tried to resolve "foo.example.com" as well.

Reason for this:
https://code.google.com/p/go/source/browse/src/pkg/net/dnsclient_unix.go#208 makes the
name fully qualified and the error will be returned right away. IMO it should use the
originally provided name for the error.
@adg

This comment has been minimized.

Copy link
Contributor

@adg adg commented Sep 5, 2013

Comment 1:

Sounds worth cleaning up.

Labels changed: added priority-soon, go1.2maybe, removed priority-triage.

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Sep 16, 2013

Comment 2:

Owner changed to @rsc.

Status changed to Started.

@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Oct 3, 2013

Comment 3:

This issue was closed by revision 94a6511.

Status changed to Fixed.

@gopherbot gopherbot added fixed labels Oct 3, 2013
@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.