-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Closed
Labels
Milestone
Description
Currently, cgo is included by default with the net package on Unix systems when not cross-compiling to allow the use of libc DNS functions. If the pure Go resolver is sufficiently improved, it should be possible to not include cgo by default (cgo can still be an option).
The net package documentation lists a few cases where the cgo resolver is needed:
- LOCALDOMAIN, RES_OPTIONS, HOSTALIASES environment variables
- OS X
- ASR_CONFIG environment variable on OpenBSD
- mDNS
- /etc/resolv.conf or /etc/nsswitch.conf specify the use of features that the Go resolver does not implement
- .local domains
If we limit the scope to Unix minus darwin and openbsd, what is the minimum feature set that we need to implement in order to feel comfortable not including the cgo resolver by default?
valyala and thediveocznic and OneOfOne