Module I said slices, strings, maps and interfaces are “small headers that point elsewhere”. This module draws each header, byte by byte, and shows what follows from the drawing.
| # | Lesson | The question it answers |
|---|---|---|
| 01 | Arrays and Slices | What is a slice, and when do two slices share memory? |
| 02 | Strings, Bytes and Runes | What is a string made of, and what does converting it cost? |
| 03 | Maps | How does a map find a key, and what does it cost in memory? |
| 04 | Pointers and Struct Layout | How are fields arranged, and why does field order change a struct’s size? |
| 05 | Interfaces Under the Hood | What is inside an interface value, and when is nil not nil? |
| 06 | Generics and Iterators | How do type parameters work, and what do they cost? |
When you finish you can draw any Go value as boxes and arrows, say how many bytes it occupies, and predict whether an operation copies, shares or allocates.