4 ms·
This is because cgo is actually a preprocessor that generates the final C and Go code that is built. The tools are just good at hiding this. Personally, I would
by james4k 13y ago
This is because cgo is actually a preprocessor that generates the final C and Go code that is built. The tools are just good at hiding this. Personally, I wouldn't say this is a bad thing. You can do some powerful things with this, including using your own .c and .h files in your Go packages. For a while, the YAML package at launchpad.net/goyaml did this by using libyaml code directly instead of having to link to external libraries, though now it is pure Go.