My hypothesis is that the Go socket library was imported from an alternate timeline where getaddrinfo() never existed. Most functions assume that one hostname means one IP address, which is fundamentally incompatible with the modern Internet.
Currently, the best solution is to use net.LookupHost(), which calls getaddrinfo() without reordering. Then pretend you're writing in C, where Dial(), Listen(), and Resolve*() only accept IP addresses, not hostnames.
Currently, the best solution is to use net.LookupHost(), which calls getaddrinfo() without reordering. Then pretend you're writing in C, where Dial(), Listen(), and Resolve*() only accept IP addresses, not hostnames.