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: flesh out LookupPort static services for nacl, etc #17045

bradfitz opened this issue Sep 9, 2016 · 1 comment


None yet
2 participants
Copy link

commented Sep 9, 2016

Note that this program,

func port(name string) {
    num, err := net.LookupPort("tcp", name)
    log.Printf("Port(%q) = %v, %v", name, num, err)

func main() {

Prints this on the playground:

2009/11/10 23:00:00 Port("http") = 0, Protocol not available
2009/11/10 23:00:00 Port("https") = 0, Protocol not available
2009/11/10 23:00:00 Port("ftp") = 0, Protocol not available
2009/11/10 23:00:00 Port("ssh") = 0, Protocol not available

We should probably bake in a more complete /etc/services for nacl and other places without /etc/services on their filesystem.

The list is small and changes very infrequently.

/cc @ianlancetaylor @mikioh


This comment has been minimized.

Copy link

commented Sep 9, 2016

CL mentions this issue.

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.