Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
net: why not provide function net.ResolveAddr(network, address string) (net.Addr, error) #35244
What version of Go are you using (
The code involved above is the real code that implements the network framework within my company. This code happens before Dial or ListenPacket, when the network type is unknown, and I need to get net.Addr.
I think the net.ResolveAddr function that returns net.Addr helps users reduce the switch case code, isn't it?