The Go Guide
By Flavio Copes
Learn Go programming: a guided path through Go basics, slices, maps, structs, interfaces, plus hands-on projects like CLI tools and a REST API.
Go is a programming language built at Google, designed for simplicity and speed.
It compiles to a single binary, has a small set of keywords, and comes with a great standard library. It’s the language behind Docker, Kubernetes, and a huge part of modern cloud infrastructure.
What I love about Go is how little there is to learn. The language is deliberately small. You can read the spec in an afternoon, and code written by others always looks familiar.
Go moves slowly and values backwards compatibility, so the fundamentals covered here are solid ground. This page is your map to the Go content on this site.
Where to start
I wrote a series covering the language basics in order. Start here:
- Introduction to the Go programming language explains what Go is and why it’s worth learning
- How to create your first Go program
- How to compile and run a Go program
- Introduction to Go workspaces covers how projects are organized
- Variables and types in Go
- Strings in Go
- Conditionals in Go and Loops in Go
- Functions in Go
Data structures
Go gives you a few core data structures, and you’ll use them constantly:
- Arrays in Go
- Slices in Go are what you’ll actually use most of the time
- Maps in Go
- Structs in Go
- Operators in Go
Then the concepts that make Go feel like Go:
If you want to go further, I explored classic computer science structures in The complete guide to Go Data Structures, with dedicated posts like the Set and the Binary Search Tree.
Build real things
The best way to learn Go is to build small programs. Go is fantastic for CLI tools, so I wrote a series of project tutorials:
- Build a Command Line app with Go: lolcat
- Building a CLI command with Go: cowsay
- Go CLI tutorial: fortune clone
- Use Go to get a list of repositories from GitHub
- Visualize your local Git contributions with Go
- Building a Web Crawler with Go to detect duplicate titles
- Go tutorial: REST API backed by PostgreSQL
Tooling
A few posts on the workflow around the language:
- Debugging Go with VS Code and Delve
- Getting started with Go CPU and memory profiling
- Deploying a Go Application in a Docker Container
Go deeper
I collected the language material in the free Go Handbook. It’s a structured walk through the language, and you can download it as PDF or EPUB.
All posts on this topic are in the Go tag archive.
Related posts about go: