Getting Started
To start off, we will install the necessary software needed for the rest of the book. We will also go over some of the conventions and assumptions made throughout. Finally, I will point out key language features you will use in the book and resources to refresh your knowledge about them.
Installing Go
The code listings in this book work with Go 1.16 and above. Follow the instructions at https://go.dev/learn/ to install the latest version of the Go compiler for your operating system. It usually involves downloading and running a graphical installation process for Windows or macOS. For Linux, your distribution's package repository may contain the latest version already, which means that you can use your package manager to install the Go compiler as well.
Once you have it installed, no further configuration is necessary to run the programs that you will write throughout the book. Verify that you have everything set up correctly by running the command go version from your terminal program. You should see an output telling you which Go version is installed and the operating system and architecture. For example, on my MacBook Air (M1), I see the following:
$ go versiongo version go1.16.4 darwin/arm64
If you can see an output like the above, you are ready to continue with the next steps.
Choosing an Editor
If you don't yet have a favorite Go editor/integrated development environment (IDE), I recommend Visual Studio Code (https://code.visualstudio.com/download ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access