Go
Everything Go - Comprehensive Syllabus
A deep library, not a single linear course. Use a path below so the sidebar does not feel endless.
How to read this book (pick a path)
Path A — Productive Go (≈ 2–4 weeks)
Foundations → Core → Errors → Testing → Concurrency basics
→ Stdlib tour (http, json, slog) → small projects
Path B — Concurrent systems
Concurrency ground-up (part 21) → Context / channels deep dives
→ Network systems → Observability
Path C — Runtime internals
Deep dives: GMP → memory model → channels → GC → netpoll
→ synctest → reading src/runtime
Path D — Ship production services
Web + DB → Infrastructure → Security → SRE/metrics
→ Performance engineering → projects (API / k8s / probes)
Path E — Hands-on web development (Bookstore track)
Part 22 Web Development in Go: structure → routing → templates
→ DB → concurrency at the edge → sessions/auth → API contracts → tests
Then 08-web (GOTH/gRPC/Huma) when you want modern stack recipes
Path F — CLI tools (stdlib → Cobra)
Part 23 CLI Tools in Go: os.Args → flag → subcommands → pipes/exec/signals
→ testing & layout → Cobra/Viper → cookbook
→ project: netkit (TCP ping, DNS, port scan, HTTP probe)
→ project: netsec (TLS cert, headers, banner, secrets hygiene, …)
Pair with stdlib 987/994 and projects (goping, linux clones)
Path G — depth on one topic
Pick a single part (e.g. concurrency, web, CLI, stdlib) and work it end-to-end
rather than skimming every path above.
Path H — Systems programming (userspace)
14-systems: Go without libc → processes → files → pipelines
→ ops toolkit; pair with specialized 92 (x/sys, eBPF, Delve)
→ infrastructure (static binaries, scratch / distroless)
Map of overlapping parts (twins)
Some topics appear twice on purpose: a compact survey early, then a deep track later. Use one path; do not read both end-to-end unless you want reinforcement.
| Topic | Survey / recipes | Deep track | Prefer when… |
|---|---|---|---|
| Concurrency | 07-concurrency-parallelism |
21-concurrency-ground-up |
Learning from zero → 21; quick patterns → 07 |
| Web | 08-web (GOTH, gRPC, Huma) |
22-web-development-in-go (Bookstore) |
First web app → 22; modern stack recipes → 08 |
| Security | 11-security |
17-security-hardening |
Overview → 11; ship hardened service → 17 |
| Performance | 09-performance-tooling |
18-performance-engineering |
pprof/tooling intro → 09; production tuning → 18 |
Also: 20-go-deep-dives (runtime/internals) pairs with Path C; 98-stdlib is a reference tour; 99-projects is build practice (and some checklist drills).
1. Foundations & Mindset
- The Go Philosophy: Why “boring” is a superpower.
- 2026 Learning Roadmap: Focusing on essentials vs. hype.
- The 3-Layer Practice System: Read, Write, Ship.
- Transitioning to Go: Insights for Java and Node.js developers.
- Go 1.27: language (generic methods, promoted field keys), toolchain, json/v2,
uuid,goroutineleak, SIMD experiment. Official notes: go.dev/doc/go1.27.
2. Core Language Essentials
- Language Building Blocks: Variables, types, and functions. 1.26:
new(expr)1.27: generic methods, promoted field keys - Control Flow: Effective use of
if,for, andswitch. - Data Structures:
- Structs and Interfaces (The “Go Way”).
- Arrays, Slices, and Maps internals.
- Working with Time in Go.
- Project Organization: Organizing projects and defining names; standard project layout.
3. Pointers & Memory Management
- The Mechanics: Understanding Stack vs. Heap.
- Memory Optimization:
- Escape Analysis: Where did my memory go?
- Memory Alignment and Padding.
- Garbage Collection (GC) tuning and
GOMEMLIMIT. Go 1.26: Green Tea GC default
- Pass by Value vs. Pass by Reference: Performance tradeoffs.
4. Advanced Error Handling
- Beyond
if err != nil: Senior techniques for robust handling. - Patterns: Sentinel errors, custom error types, and error wrapping.
- Techniques: Error handling without a garbage collector (Odin comparison); the “Must” pattern.
5. Concurrency & Parallelism
- Goroutines & Channels: The heart of Go’s concurrency model.
- Sync Mechanisms: WaitGroups, Mutexes,
sync.Map, and the overlookedsync.Cond. - Execution Control:
- Context Package: Lifecycles, cancellation, and timeouts.
- Worker Pools: Avoiding the chaos of uncontrolled concurrency.
- Pipelines and complex concurrency patterns.
6. Web Development & Modern Stacks
- Hands-on web path (part 22): Bookstore curriculum — project structure,
net/httprouting, templates, databases, sessions/auth, frontend contracts, testing/logging. Simple language, real examples, modern Go without niche edge cases. - The GOTH Stack: Go + Templ + HTMX + Tailwind.
- Frontend Interaction:
- Skeleton loading with Go and HTMX.
- Live reloading with Air.
- API Design:
- Building REST APIs with routing and middleware.
- Microservices: Switching to gRPC.
- Using Huma for OpenAPI-backed APIs.
- Integrations: Working with PostgreSQL and Redis.
7. Performance, Profiling & Tooling
- Benchmarking: Proof-based optimization using
go test -bench. - Profiling: Deep dives with
pprofandtrace. - Code Generation: Using
sqlcfor type-safe SQL;stringerfor enums. - The Modern Toolkit:
ripgrep,fd,fzf,zoxide,bat, andjq.go fixmodernizers +//go:fix inline. 1.26–1.27goroutineleakpprof profile (GA). Go 1.27gopsutilfor system and hardware stats.
- Advanced Refactoring:
gofmt,gopatch, andgoimports.
8. Infrastructure & Deployment
- Containerization: Multi-stage Docker builds for lean binaries; health/signals; non-root.
- Platform Guides:
- Deploying to Render and Leapcell.
- Go on NixOS and FreeBSD.
- Running Go on Mini-PCs for local AI (Llama 3).
- CI/CD: Automated vulnerability checking and hardening.
- Kubernetes basics: Deployment/Service, probes, resources, secrets.
- Release: GoReleaser + tag-driven GitHub Actions.
9. Security & Hardening
- Security Tools:
govulncheck,gosec,capslock, andnilaway.crypto/hpke,testing/cryptotest,crypto/mldsa, and experimentalruntime/secret. 1.26–1.27
- Hardening: Production-grade Ubuntu hardening for Go apps.
- Design Principles: S.O.L.I.D principles in the context of Go.
10. Specialized Applications
- Desktop Apps: Cross-platform development with LCL, CEF, and Webview.
- Observability: Integrating OpenTelemetry.
- Machine Learning: Building LLM-powered applications in Go.
- Portable
simd+simd/archsimd(experimental viaGOEXPERIMENT=simd). 1.26–1.27
- Portable
- Systems Programming: How Go talks to the kernel without libc; debuggers, syscalls, and low-level internals.
11. Production Deep Dives
- Network systems: TCP services, HTTP resilience, reverse proxies; TLS; DNS; Transport tuning; netcheck project.
- Systems programming: How Go reaches the kernel without libc (static Linux binaries,
CGO_ENABLED=0, Go vs C); processes, signals, safe filesystem I/O, Unix pipeline CLIs; env/CWD/umask; file descriptors; mmap; Unix domain sockets; flock/pidfiles; time/timers; config watch/reload; PTYs; rlimit/GOMEMLIMIT; least privilege; ops logging; socket activation; procfs; projects systool, sysops, minisup. - Distributed infra: Service discovery, retries/circuit breakers, queue backpressure; caching; idempotency; leader leases; outbox; resilient worker project.
- Observability & SRE: slog correlation, Prometheus metrics design, tracing propagation; SLI/SLO/error budgets; livez/readyz; alerting/runbooks; instrumented service project.
- Security hardening: TLS/mTLS, authn/authz, secrets rotation; JWT validation; input validation/SSRF; supply chain; secure service checklist.
- Performance engineering: Benchmark/profile workflows, allocations/GC, contention tuning; load-test baselines; allocation recipes; PGO/build flags; optimize-endpoint project.
12. Modern Go Book Synthesis
- Pattern distillation from recent (2024–2025) Go books — production-oriented themes mapped into this curriculum.
13. Go Deep Dives (Runtime, Toolchain & Production)
- Runtime core: GMP scheduler (incl. Go 1.26 syscall/P simplification), memory model, channels/select, netpoller, timers, mutex/semaphores, sysmon/scavenger.
- Representation: Interfaces (eface/iface), slice/map/Swiss tables, strings/bytes,
weak/unique, error boxing cost. - Control & safety: Defer/panic stacks, stack growth, context trees, goroutine leaks, finalizers/cleanup, synctest bubbles.
- Performance: GC pacer/GTGC,
sync.Pool/zero-alloc, pprof/trace internals, zero-copy I/O, escape/PGO/compiler SSA. - Net & crypto path: HTTP Transport pools, TLS handshake costs, slog handler design.
- Toolchain: Modules/MVS, link/race/buildmodes, cgo transitions, ABI/asm, coverage/fuzz engines, build cache, GOEXPERIMENT, Wasm/wasip1, plugin pitfalls.
- Ops craft: GOMAXPROCS vs cgroups, production mistake map, debugging tooling, reading
src/runtime, X/ecosystem topic radar. - Article radar + more runtime: Internals-for-Interns series map; memory allocator; bootstrap; selectgo; stacktraces; mmap vs pread.
- Compiler & advanced runtime: Frontend + IR/SSA/link; race detector; write barriers/assist; work stealing; type asserts; signals; HTTP/2; sql pool; JSON perf; errgroup.
14. Concurrency From the Ground Up
- Diagram-first path through goroutines, channels, pipelines, time, context, wait groups, races/mutexes, semaphores, atomics, testing, and a teaching scheduler model.
- Pedagogical map aligned with interactive concurrency curricula (e.g. antonz.org Gist of Go: Concurrency); original prose and ASCII diagrams for this library.
15. Web Development in Go (Bookstore track)
- Separate hands-on section: intro → structure → HTTP/routing → templates → databases → web concurrency → sessions/auth/roles → frontend–backend contracts → testing/debugging.
- Key skills: modular design, REST with
net/http(and Mux where relevant), secure cookies, JSON contracts, mocks, logging, external API clients—clarity over complex edge cases.
16. Golang CLI (stdlib → Cobra)
- Stdlib-first:
os.Args,flag/FlagSetsubcommands, exit codes, stdout vs stderr, env + JSON config, stdin pipes,os/exec, signals/context, testing, app layout. - Libraries: Cobra basics & advanced (persistent flags, hooks, completion), Viper config layering, pflag/urfave/cli/kong notes, shipping (version ldflags, cross-compile, GoReleaser).
- Cookbook: hello, cat, find, NDJSON jq-lite, HTTP client, kv store, Cobra todo, and more ideas.
- Project — network tools: multi-command
netkit(TCP ping like classic ping, DNS lookup, concurrent port scan, HTTP probe, whoami) with timeouts, Ctrl-C, and tests. - Project — network security mini-tools: multi-command
netsec(TLS cert expiry/SANs, security headers, TCP banner, redirects, CIDR check, cookie flags, file hash, naive secret scan, crypto/rand tokens, listen) — simple and minimal, stdlib only. - More CLI projects:
textkit(freq/cut/ts),httpdbg(curl-like timings), cross-platform notes. - Web production extras: middleware chains, graceful shutdown, rate limits, WebSockets, uploads/downloads, Bookstore API capstone.
17. Standard Library Tour
- Map of the stdlib: When to reach for which package before any framework.
- I/O & text:
fmt/slog,bytes/strings/strconv,io/bufiocomposition. - Files & embed:
os,filepath,io/fs,//go:embed. - Wire formats: JSON (
encoding/jsonandencoding/json/v2), CSV, XML, base64/hex; binary frames, gob, PEM. Stdlibuuid. - HTTP & tools: Modern
ServeMux, clients with timeouts,flag/os/exec/signal. - Budgets & concurrency:
time+contextrecipes;sync/atomic. - Modern collections:
slices,maps,cmp,iter(range-over-func). - Quality:
testingexamples, fuzz, benches; crypto/hash/rand/regexp hygiene. - Data & sockets:
database/sqlpools/queries/tx;netdial/listen/UDP/Unix. - Templates & archives:
html/template+text/template; gzip/zip/tar. - Math & ops edge:
math/bits/big; mime/multipart uploads;expvar, pprof,runtime/debug, buildinfo.
18. Projects
- Progressive labs from CLI utilities through Kubernetes, Terraform, Prometheus, eBPF, Proxmox, and TinyGo — plus a large idea backlog.