Practical introduction to Go: Development environment (1/3)

ยท 4 minute read

This is the first part of the three part practical introduction to Go series. It is written for developers, who have already some experience in other languages and wish to learn and become productive in Go.

This article focuses on setting up a Go development environment, so that you can run and compile Go code locally and are prepared for the next parts of this series, starting with: Language basics.

Why Go?

I love Go, so my perspective might be a bit biased. I also acknowledge that choice of programming language is heavily influenced by personal preference and suitability for the use-case at hand. Having this said, here is why I think Go is a great tool:

Go language tooling

The first thing you need to have to do any local Go development is the go binary. Head over to https://golang.org/dl/ and download the installer, then follow the guide for your respective operating system:

Once you followed the steps you should be able to execute go version from your terminal:

$ go version
go version go1.14.6 linux/amd64

That’s it. Go comes with all you need out-of-the-box. The most important commands, which will be used in the following parts of this series, are:

Aside from the go binary, the installation also comes with the source code of Go Standard Library, which we’ll explore in the following articles.

Choose your IDE

If you already have a favorite IDE, chances are there is a good Go plugin or extension available. If not, or if you wish to try out something new consider the following:

Microsoft Visual Studio Code

Relatively lightweight for a full IDE, extremely extensible, huge community & ecosystem.

IntelliJ: GoLand (or IDEA with plugin)

Full fledged IDE, first class Go integration, heavy weight.

IntelliJ offers two flavours:

VIM

Battle tested, fast, very opinionated.

Others

Aside from the above many other editors and IDEs support Go development. To name a few:

Up next

Now that you have an editor of your choice and the Go binaries installed, head over to the next part in the series and get familiar with the language basics.