To use most of the libraries and functionality explored in this book, you'll also need to use Cgo (the built-in Go to C language bridge). Cgo requires the availability of a C compiler and some related tools depending on the operating system. This section outlines how to set them up.
Setting up Cgo
Microsoft Windows
For Cgo to function on Windows, you'll need to have the gcc (or compatible) compiler installed. If Visual Studio is already installed, then you may have a C compiler. For those who don't, this section steps through configuring a build environment on the command line. The easiest way to get up and running (in my experience) is to download and install MSYS2 (a software distribution) and build a...