Skip to Content
Skip to content
PROGRAMMING

Go Tutorials

Standalone Go tutorials covering concrete runtime traps and service patterns: slice backing-array aliasing, nil-map panics, typed-nil interfaces, context.Context timeouts, worker pools, go test -race data races, pprof allocations, and static binaries under 10 MB.

Each guide pairs a small runnable Go program with its exact compiler, test, or benchmark output so you can verify the behavior locally.

Go
Find and Fix Go Data Races With -race Level: Advanced

Trigger a real data race under go test -race, read the race detector output, and fix shared counters, maps, and slice writes using atomic, sync.Mutex, and disjoint indices.

Go
Catch Goroutine Leaks and Hanging Tests With t.Cleanup and go test -timeout Level: Advanced

Detect leaked goroutines and deadlocked channels in Go tests using runtime.NumGoroutine, t.Cleanup, and go test -timeout instead of waiting for a 10-minute CI hang.

Go
Find Edge-Case Panics in Go With go test -fuzz Level: Advanced

Write FuzzX(f *testing.F) targets and run go test -fuzz to discover edge-case panics and automatically save regression cases under testdata/fuzz.