Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: dnsConfig could be more usable as-is #15473
dnsConfig currently reflects the contents of /etc/resolv.conf, but that means some of the fields need to be repeatedly processed in dnsclient_unix.go before being used. For example, in tryOneName we have to call JoinHostPort every time for each queried server, producing extra garbage, or convert cfg.timeout to time.Duration. (*dnsConfig).nameList could be simplified if we ensured search list entries always ended in a period. Maybe there are more.