You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
darwin
amd64
e4dff4e4278f tip
This code prints: 0. I would expect it to return the port it found for that listener.
package main
import "net"
func main() {
l, err := net.ListenTCP("tcp", nil)
if err != nil {
panic(err)
}
println(l.Addr().(*net.TCPAddr).Port)
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: