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

Closed
rsc opened this issue Sep 24, 2013 · 2 comments
Closed

net: (*TCPAddr).String behaves incorrectly when IP is missing #6465

rsc opened this issue Sep 24, 2013 · 2 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Sep 24, 2013

http://play.golang.org/p/jA_lETPNef

    addr := &net.TCPAddr{Port: 12345}
    fmt.Println(addr)

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

The given addr is what you get from ResolveTCPAddr(":12345"), so it should
invert.
@rsc
Copy link
Contributor Author

rsc 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
@gopherbot
Copy link

CL https://golang.org/cl/11951 mentions this issue.

mikioh pushed a commit that referenced this issue Jul 10, 2015
Updates #6465.

Change-Id: I5babbcf4c92dae47c823a41628b01e4ceb2332eb
Reviewed-on: https://go-review.googlesource.com/11951
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@golang golang locked and limited conversation to collaborators Jul 11, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
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

2 participants