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: LookupPort("tcp", "123") no longer returns 123 #12263

rsc opened this issue Aug 21, 2015 · 2 comments


None yet
2 participants
Copy link

commented Aug 21, 2015

This broke because the cgo-based lookup did accept "123" but the Go-based lookup does not. This means the behavior was at best inconsistent before, but it does make sense that you should be able to look up tcp/80 in addition to tcp/http.

If we have a more serious problem for a 1.5.1 this would be a candidate for an add-on.

@rsc rsc self-assigned this Aug 21, 2015

@rsc rsc added this to the Go1.5.1 milestone Aug 21, 2015


This comment has been minimized.

Copy link

commented Aug 25, 2015

CL mentions this issue.

@rsc rsc closed this in 35365b9 Aug 27, 2015


This comment has been minimized.

Copy link

commented Sep 3, 2015

CL mentions this issue.

rsc added a commit that referenced this issue Sep 8, 2015

[release-branch.go1.5] net: restore LookupPort for integer strings
This worked in Go 1.4 but was lost in the "pure Go" lookup
routines substituted late in the Go 1.5 cycle.

Fixes #12263.

Change-Id: I77ec9d97cd8e67ace99d6ac965e5bc16c151ba83
Reviewed-by: Brad Fitzpatrick <>
Reviewed-by: Ian Lance Taylor <>

@golang golang locked and limited conversation to collaborators Sep 4, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.