Master Go's core built-in data structures so you can store, grow and look up data confidently. You will learn how arrays and slices differ, how slice internals (len, cap and append) really behave, and how to use maps with the comma-ok idiom, sorting and nested structures in everyday back-end code.
Watch the free preview
Arrays versus slices — free to watch, no account needed.
What you'll learn
- Work with Go's core data structures — arrays, slices and maps — in real programs
- Explain how slice internals (len, cap and append) behave and why sharing backing arrays matters
- Use slicing, copying and append correctly without introducing aliasing bugs
- Create, read, update, delete and iterate maps using the comma-ok idiom
- Sort slices and build structs that compose slices and maps for real workloads
Syllabus
Arrays and Slices — The Foundations
Arrays versus slicesFree preview
Slice internals — length, capacity and append
Slicing, Copying and Aliasing
Slicing expressions and shared backing arrays
Copying slices and avoiding aliasing bugs
Maps — Keyed Collections
Maps — create, read, update, delete and iterate
The comma-ok idiom and map value semantics
Sorting and Composite Structures
Sorting slices and ordering maps
Structs of slices and maps — modelling real data
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10