top | item 46251374 (no title) purpleidea | 2 months ago I was surprised too, that I had to check the docs, so I assume the user was misinformed. discuss order hn newest bitbasher|2 months ago Perhaps I misremembered or things changed? For instance, the os/user results in a dynamicly linked executable: https://play.golang.com/p/7QsmcjJI4H5There are multiple standard library functions that do it.. I recall some in "net" and some in "os". telotortium|2 months ago os.UserHomeDir is specified to read the HOME environment variable, so it doesn’t require CGo. os/user does, but only to support NSS and LDAP, which are provided by libc. That’s also why net requires CGo- for getaddrinfo using resolv.conf
bitbasher|2 months ago Perhaps I misremembered or things changed? For instance, the os/user results in a dynamicly linked executable: https://play.golang.com/p/7QsmcjJI4H5There are multiple standard library functions that do it.. I recall some in "net" and some in "os". telotortium|2 months ago os.UserHomeDir is specified to read the HOME environment variable, so it doesn’t require CGo. os/user does, but only to support NSS and LDAP, which are provided by libc. That’s also why net requires CGo- for getaddrinfo using resolv.conf
telotortium|2 months ago os.UserHomeDir is specified to read the HOME environment variable, so it doesn’t require CGo. os/user does, but only to support NSS and LDAP, which are provided by libc. That’s also why net requires CGo- for getaddrinfo using resolv.conf
bitbasher|2 months ago
There are multiple standard library functions that do it.. I recall some in "net" and some in "os".
telotortium|2 months ago