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: (*TCPAddr).String behaves incorrectly when IP is missing #6465

rsc opened this issue Sep 24, 2013 · 2 comments


None yet
2 participants
Copy link

commented Sep 24, 2013

    addr := &net.TCPAddr{Port: 12345}

should print ":12345" but prints "<nil>:12345".

The given addr is what you get from ResolveTCPAddr(":12345"), so it should

This comment has been minimized.

Copy link
Contributor Author

commented Sep 24, 2013

Comment 1:

This issue was closed by revision e8bbbe0.

Status changed to Fixed.

@rsc rsc added fixed labels Sep 24, 2013

@rsc rsc self-assigned this Sep 24, 2013

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015

@rsc rsc removed the go1.2 label Apr 14, 2015


This comment has been minimized.

Copy link

commented Jul 7, 2015

CL mentions this issue.

mikioh pushed a commit that referenced this issue Jul 10, 2015

Mikio Hara
net: ensure that ResolveIPAddr(addr.String()) reproduces addr
Updates #6465.

Change-Id: I5babbcf4c92dae47c823a41628b01e4ceb2332eb
Run-TryBot: Mikio Hara <>
Reviewed-by: Ian Lance Taylor <>

@golang golang locked and limited conversation to collaborators Jul 11, 2016

This issue was closed.

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.