The problem is not C as C is no magic. The problem is in particular
ways a particular OS (or even kernel) makes this information available.
For instance, under Linux you're supposed to parse relevant bits
of /proc or /sys; on Windows you're supposed to call out to WMI etc.
C is not concerned with this as Go calls the OS's kernel it's running
on directly, using syscalls, and this layer is exposed to the
programmer using the syscall and unsafe packages (the latter is not
strictly needed for syscalls but helps gatewaying data between Go and
the kernel).
So to recap, discover which ways to get H/W info your target platform
does then try to use it via the syscall package (look at the
src/pkg/syscall directory in the Go sources for examples) and then come
back if/when you have problems with this.