Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

Go

Learn the core of Go, the small, fast language behind a lot of modern cloud tooling. You set up the toolchain, then learn variables, types, strings, slices, maps and structs by building one small word-counting tool, step by step.

Ready to learn6 sections · 24 lessons
Start learning

Course curriculum

Introduction to Go4 lessons

Meet the language and the problem it was built to solve, install the toolchain, write and run a first program, and learn the handful of go subcommands you will use every day.

  1. Why Go, and Where It Came From10 min
  2. Setting Up Go12 min
  3. Hello World in Go12 min
  4. The go Command14 min
Variables & Constants4 lessons

Declare variables with var and :=, predict the zero value every type starts with, build named constants with const and iota, and learn how scope and shadowing decide which variable a name refers to.

  1. var vs :=12 min
  2. Zero Values12 min
  3. const and iota14 min
  4. Scope and Shadowing14 min
Data Types4 lessons

Pick the right integer, predict overflow and integer division, handle floating-point surprises and complex numbers, use booleans without truthiness, and treat characters as runes rather than bytes.

  1. Integers, Signed and Unsigned14 min
  2. Floating Points and Complex Numbers14 min
  3. Booleans10 min
  4. Runes15 min
Strings and Type Conversion4 lessons

Write interpreted and raw string literals, treat strings as immutable bytes and lean on the strings package, then convert between numbers, strings, bytes and runes explicitly and safely.

  1. Interpreted String Literals10 min
  2. Raw String Literals10 min
  3. Working with Strings14 min
  4. Type Conversion15 min
Arrays & Slices4 lessons

Use arrays when the size is part of the meaning, use slices for everything else, predict length, capacity and sharing when you slice and append, preallocate with make, and convert between arrays and slices.

  1. Arrays12 min
  2. Slices: Capacity and Growth16 min
  3. make()12 min
  4. Converting Between Slices and Arrays14 min
Maps & Structs4 lessons

Count and look up values with maps, tell a missing key from a zero value with the comma-ok idiom, group fields into structs with JSON tags, and compose larger structs by embedding smaller ones.

  1. Maps14 min
  2. The Comma-Ok Idiom12 min
  3. Structs, Tags and JSON16 min
  4. Embedding Structs16 min