Hacker News new | past | comments | ask | show | jobs | submit login

I wish I had your time and effort to be able to fix the issues of split DNS in macOS being broken unless using cgo.

https://github.com/golang/go/issues/12524

This has been an open issue since 2015. It's a pain because every single last tool using go cross compilation fails to use the proper DNS resolver and thereby doesn't work when using work VPN's.

This is tools like: kubectl, vault, concourse (fly), and many other binaries that get built on CI, and unless the company builds on macOS builders and uses CGO_ENABLED=1 DNS resolution is just broken.

And it is increasingly frustrating.




Very interesting and very helpful. TLD-specific resolvers on Mac not working is the missing piece I needed to understand why our team builds binaries on Mac and cross-compiles to the other two.


A better question is, why is Go using its own DNS resolver instead of the OS-provided one in the first place?


> why is Go [doing something that doesn't seem to make much sense]

Because it's Go, and NIH is very strong and alive, and Go can do it better than anyone else.


Sure, but there's usually some purported rationale. E.g. with direct syscalls it was to avoid FFI overhead. I'm curious as to what it was here; presumably trying to keep everything async?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: