3 ms·
If cgo is enabled (the usual case), Go uses libc for DNS if the configuration looks exotic enough that the pure-Go code wouldn't give the same results. https:/
by yencabulator 6y ago
If cgo is enabled (the usual case), Go uses libc for DNS if the configuration looks exotic enough that the pure-Go code wouldn't give the same results.
https://golang.org/pkg/net/#hdr-Name_Resolution https://golang.org/pkg/net/#hdr-Name_Resolution
- ArchOversight 6y agoThis is a long standing issue in various open source projects that use Go, where they want to ship static binaries. Most recently, this happened with Concourse and it's Fly binary: https://github.com/concourse/concourse/issues/3691 https://github.com/concourse/concourse/issues/3691 The developers don't want to use CGO, or when they do use CGO they disable the net part... and now stuff doesn't work. Projects have to specifically build with cgo enabled on macOS, or else it fails.