Sikau

Learn Go

Simple to learn, hard to master — Go and its classic mistakes.

Write real Go in the browser: types and zero values, slices and the append traps, maps, closures, defer and recover, structs and pointer receivers, interfaces, errors with %w, goroutines, channels and deadlocks, and table-driven tests — each with the mistakes experienced Go programmers still make. Programs run in a Go simulator that speaks the real compiler's language.

Intermediate · 10 lessons · about 7 hours · free

Start Go free: run real code in your browserright here

Continue with Google

What you will learn

Unit 1: Go fundamentals

Types, slices, maps, functions and structs — and the classic traps.

  1. Day 1Packages, variables and typespackage main, :=, zero values, Go's numbers and strings.35 min
  2. Day 2Slices and mapsLength, capacity, shared arrays and the append traps.40 min
  3. Day 3Functions, closures and deferMultiple results, variadic functions, closures, defer and recover.40 min
  4. Day 4Structs and methodsStruct types, value vs pointer receivers, embedding.40 min
  5. Day 5Project: A momo shop tillOrders, receipts and best-sellers with structs, slices and maps.45 min

Unit 2: Interfaces, errors and goroutines

Abstraction, error handling, concurrency and tests the Go way.

  1. Day 6InterfacesImplicit satisfaction, Stringer, type assertions and type switches.40 min
  2. Day 7Errors the Go wayErrors as values, wrapping with %w, errors.Is and errors.As.40 min
  3. Day 8Goroutines and channelsgo, channels, select, WaitGroup, Mutex — and deadlocks.45 min
  4. Day 9Table-driven testsgo test, testing.T, subtests and tests that catch bugs.40 min
  5. Day 10Capstone: A concurrent log analyserParse, count with worker goroutines, report — with proper errors.50 min

Before you start

These courses make Go easier:

See all courses

Built with ❤️ by dibe.sh