Golang from Scratch: Learn Go Step by Step#
Go (also called Golang) is a small, fast language for servers, command-line tools and anything that needs to do many things at once. This course follows the 40 Days of Go syllabus from the syedjaferk/40_days_of_go_lang repository: start with the basics, build file and command-line tools, then web APIs and a database, and finish with goroutines, channels and tests.
Note
Why learn Go, in one line? You write simple code, the compiler checks it hard, and you ship one fast program with nothing else to install. Docker, Kubernetes and Terraform are all written in Go.
How each session works#
Watch the class (where a recording exists): the matching video from the Golang from Scratch playlist sits at the top of the session.
The big idea: the topic in plain words, with an everyday example.
A picture: a diagram of the idea.
Runnable code: every program is run for real, and the output you see is what it printed.
Common mistakes: what trips beginners up.
Hands-on exercises: try first, then reveal the solution (every solution was run too).
Practice: a quiz and a flashcard deck for the session.
Tip
New here? Start with Setup, then go in order. Type the examples yourself rather than copying; your fingers learn the syntax faster than your eyes do.
Important
Read the compiler’s errors. Go’s messages are short and exact (declared and not used,
missing return). Fix the first one, run again, and repeat. That loop is the fastest way to learn.
Getting started
Phase 1 · Foundations
Phase 2 · Files and command-line tools
Phase 3 · Web and data