What you’ll learn
- Chapter 1From the first character to your own value – Starting point, output, variables and calculating.
Hallo, Go! · var: remembering a value · := and text · Calculating and += - Chapter 2Deciding and repeating – Check values and control small sequences.
bool and comparisons · if and else · for: repeat on purpose - Chapter 3Your own building blocks and a mini project – Organise data, build functions and connect what you have learned.
Slices: a flexible list · func: reusing a calculation · Your Go points coach - Chapter 4Level up: your next practice chapter – Understand four new building blocks in small steps and use them yourself.
map: storing values by name · range: position and value · struct: describing a study session · An error as a return value - Chapter 5Master chapter: how real programs are built – Five building blocks from real projects – explained, connected, filled in and written by you.
Methods on a struct · interface: what a type must be able to do · Goroutine and channel: working in parallel · defer: cleaning up at the end · switch: many cases at a glance - Chapter 6Texts and slices – Work with strings and strconv, slice and sort slices, and count words.
The strings package · Numbers and texts: strconv · Slicing slices · Sorting with sort · Boss: count words - Chapter 7Functions in depth – Multiple return values, variadic functions, closures and your own errors.
Multiple return values · Any number of arguments: ...int · Closures: functions with a memory · Your own errors: errors and fmt.Errorf · Boss: checking inputs - Chapter 8Pointers and your own types – Pointers, embedding, your own String methods, iota and a small warehouse.
Pointers: & and * · Embedding instead of inheritance · Your own output with String() · Constants with iota · Boss: a small stock - Chapter 9Maps and structs – Look up values in maps, detect missing keys, collect structs in slices and sort them.
Looking up with map · Does the key exist? The comma-ok · Structs in a slice · Sorting by a field: sort.Slice · Boss: a grade book - Chapter 10Interfaces – Describe behaviour without writing “implements”: interfaces, polymorphism, type switch and type assertions.
Describing behaviour: interface · Many types, one loop · Which type is inside? type switch · Looking specifically: type assertion · Boss: different payment methods - Chapter 11defer, errors and panic – Clean up with defer, wrap and detect errors, own error types, panic and recover.
Cleaning up at the end: defer · Wrapping and recognising errors: %w and errors.Is · Error types of your own · Emergency brake: panic and recover · Boss: an account with clean errors
Final project: Go points coach
Combine variables, a decision and an output into your own points coach.
How it works
Every lesson starts with short explanation pages. Then you practise with multiple-choice questions, fill-in-the-gap tasks, putting code in order and writing your own code – with hints and instant feedback. Free, without ads, on phone, tablet and PC.