Skip to content

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

@rsc

Description

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions