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
Assignees
Milestone

Comments

@rsc
Copy link
Contributor

@rsc 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

This comment has been minimized.

Copy link
Contributor Author

@rsc 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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jul 7, 2015

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
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
2 participants
You can’t perform that action at this time.