Core language in Go (Golang)
Functions, errors as values, the two data structures you use all day, your own types, and tests.
- 01Functions, multiple returns, and errorsThere are no exceptions. An error is a value you return, and that changes everything.Graded challenge
- 02deferCleanup you cannot forget, and the two traps that catch most people once.
- 03Arrays and slicesThe data structure you use all day, and the shared-memory trap inside it.Graded challenge
- 04MapsA hash table with two behaviours that surprise most people once.Graded challenge
- 05Strings, bytes, and runesWhy `len("héllo")` is 6, and the string operations you will use every day.Graded challenge
- 06PointersWhat `&` and `*` do, when you need them, and why Go pointers cannot hurt you the way C ones can.
- 07StructsHow you make your own types by grouping values under one name.Graded challenge
- 08Methods, receivers, and embeddingThe rule about receivers that most beginners trip on.Graded challenge
- 09InterfacesGo’s main abstraction, satisfied without ever being declared.Graded challenge
- 10Type assertions and type switchesGetting the concrete value back out of an interface, safely.Graded challenge
- 11Error values in depthSentinels, custom types, wrapping, and handling each error once.Graded challenge
- 12Packages and visibilityA folder is a package, and capitalisation is your access control.
- 13JSONTurning structs into JSON and back, and the field that disappears with no error.Graded challenge
- 14TestingPart of the toolchain, not a library you pick.