Lesson 01 · Backend & Systems with Go
Go: Fundamentals
Why Go exists and how to think in it: packages and the go command, variables and zero values, multiple return values, the only loop, switch, printf verbs, and go run versus go build.
Prerequisites: Python collections
Learning objectives
By the end of this lesson, you will be able to:
- Explain what Go is designed for and set up the Go toolchain on your machine
- Write a runnable Go program: package main, imports, func main
- Choose between var and := and read Go's basic types and zero values
- Return and consume multiple values, including the (value, error) pattern
- Pick the right form of for, write switch without fallthrough, and run code with go run and go build