3 ms·
I believe "net" does so for native dns lookups. You can disable that by building go with 'CGO_ENABLED=0', if desired.
by stock_toaster 14y ago
I believe "net" does so for native dns lookups. You can disable that by building go with 'CGO_ENABLED=0', if desired.
- 4ad 14y agoThat is correct. It uses libc for resolving names because systems might be configured to use NIS or LDAP before DNS. With cgo disabled it defaults to using its own DNS resolver and resolv.conf.