Lessons
An introduction to writing Go
Go · Introductory. Ten lessons. Open-book quizzes. Lesson 1 free.
10 lessons · The Host · Lesson 1 free
Pass all ten lessons for the certificate. Sample · Claim

Lesson 1 · On the house
Package main and fmt.Println
The smallest Go program that talks back.

Lesson 2
Variables, short declare, and types
var, :=, and basic types.

Lesson 3
Strings and runes
UTF-8 strings; len is bytes.

Lesson 4
If, else, and comparisons
Branches without parentheses.

Lesson 5
For loops — the only loop
for covers while, classic, and range.

Lesson 6
Slices
Dynamic views over arrays.

Lesson 7
Maps
Key-value tables.

Lesson 8
Structs and methods
Named fields; methods with receivers.

Lesson 9
Functions and multiple returns
Named params; (T, error) idiom.

Lesson 10
A small Go program
Compose package, vars, slice, and a function.
Sample certificate
Certificate of completion
Sign in to claim your certificate of completion.
Certificate
Finish all ten lessons, then sign in
Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.