Go
Go was designed at Google to make large-scale software engineering sustainable. It is small, fast, garbage-collected, and ships with goroutines, a concurrency primitive that makes writing networked services genuinely enjoyable.
What makes Go popular
- Compiles to a single static binary, trivial to deploy
- Lightning-fast compile times
- Goroutines and channels make concurrency a first-class concept
- Powers Docker, Kubernetes, Terraform, and much of modern infrastructure
The in-browser playground
The editor on the right runs your Go source directly in the browser, so there is nothing to install to work through the bulk of this course. The first run takes a second or two to initialise; every run after that is fast.
This coding environment covers the full Go language and most of the standard library, so roughly 90% of this course runs right here. You can write goroutines, channels, interfaces, generics, encoding/json, strings, regexp, and everything else Go programmers reach for day-to-day.
What the playground cannot do
A few things do not work inside a browser sandbox, no matter how clever the interpreter:
- Real filesystem access.
os.Openand friends have no disk to read from. - Real network access.
net.Listen,http.ListenAndServe, and outbound HTTP calls have no socket layer. - The Go toolchain.
go test,go build,go mod,go fmt, andgo vetare separate binaries shipped with Go itself, not the language runtime. - CGo,
unsafe, and a few deep-reflection edge cases.
The course handles these two ways. Where the substitute is itself a real Go idiom, the lesson runs in the playground (for example, HTTP handlers are tested with httptest.NewRecorder, which is exactly how production Go code is unit-tested). Where the substitute would teach the wrong thing, the lesson will say "run this on your own machine" and walk you through the commands.
Install Go locally
You will need a local Go installation for the lessons that ask you to run something in your own terminal. Install it now so it's ready when you get there.
- macOS:
brew install go, or the installer from go.dev/dl - Linux: your distro's package manager, or the installer from go.dev/dl
- Windows: the installer from go.dev/dl
Verify the install with go version in a terminal. Anything 1.23 or newer is fine, and the latest stable release is the best choice. Later lessons use 1.22 and 1.23 features such as ServeMux path patterns, r.PathValue, and range-over-function syntax, so older installs will not compile every example.