Another thing to note is that 1.16 brings support for OpenBSD/mips64! jsing@ has been going to town!
The whole “forcing languages to deal with (garbage) C APIs”¹ reminds me of a discussion about a better ABI format that also captured things like lifetimes, ownership etc.
But I can’t find the link to it anymore, anyone remembers the link or good search terms for it?
¹ looking at you, TLS errno
All of this because of security theater, sigh.
Why can’t statically linked Go programs look up hostnames? Is it because of how security is set up on OpenBSD?
In general, full support for looking up hostnames requires calling the platform’s C library functions. Go currently only does this in dynamically linked programs; in statically linked programs it uses a pure Go resolver that supports only a subset of the possible hostname lookup features.
(I’m the author of the linked-to article.)
Not sure about OpenBSD specifically, but on a lot of *NIX systems name lookup is handled via NSS, which dynamically loads libraries for libc to use: this allows you to extend name lookup without recompiling. Solaris also uses library loading to be able to get locale support in libc.
It’s interesting that this doesn’t mention macOS. All Go programs on macOS broke a while ago because the syscall parameters for gettimeofday changed and Go didn’t go via libSystem and so didn’t pick up the change.