Concurrent Systems Programming with Go
Goroutines, Channels, Memory Profiling & High-Throughput APIs
7 modules, 35 lessons: The Go Toolchain and Fundamentals; Types, Structs, and Interfaces; Errors and Testing; Concurrency and Context; The Standard Library for Tooling; Building CLIs and Services; Project: End to End Health Checker.
Intermediate · 2 hours · 35 lessons · 86 labs
Who it is for
Intermediate level.
For programmers who know another language and want to write fast, dependable tools and services in Go, from goroutines and channels to a finished health checker shipped in a small image.
What you don't need yet:
- No previous Go experience
- No experience with concurrency: it is built up step by step
- No Go install for the labs: they run in your browser
What helps:
- Some programming in another language, such as C, Python or JavaScript
Before you start:
- Basic understanding of programming in C, Python, or JavaScript
Take first:
Take next:
- Scalable System Design & Distributed Architecture — Advanced
- Docker Architecture & Production Containers — Intermediate
Learning paths:
Nobody needs to know everything before they start. Each course builds on the one before, so a learning path takes you there step by step.
Labs
86 labs, 62 of them graded: you write the code, it runs, and graded labs check the result. The outline lists each lesson's labs.
What is free
Start free: First 4 lessons free with an account. Pro: Every course, lab, handbook, practice exam and certificate.
- Pro monthly — $29 a month. Every course, lab, handbook, practice exam and certificate
- Pro yearly — $249 a year. Every course, lab, handbook, practice exam and certificate
Course outline
The Go Toolchain and Fundamentals
- What Go Is and Why It Matters (3 labs): You can explain why platform and DevOps teams write their tooling in Go, compile and run a program with the go command, and describe exactly what the compiler hands you at the end of a build.
- Installing the Go Toolchain (2 labs): You can install the Go toolchain the way that suits a laptop, a build agent or a container, and use the go command's own subcommands for formatting, checking and documentation instead of reaching for extra tools.
- Go Workspaces and Modules (2 labs): You can start a module, split a tool into packages with import paths that follow from the module path, keep dependencies tidy and vendored, and use a workspace file when a tool and a shared library sit in one checkout.
- Your First Program and go run (4 labs): You can choose correctly between running, building and installing a program, write functions that return a value alongside an error, format output with the verbs you will use daily, and set an exit code that a pipeline can act on.
- Variables, Typing, and Zero Values (4 labs): You can declare variables both ways and say which to use where, predict the zero value of any type and design configuration structs around it, define constant sets with iota, and convert between numeric types without guessing.
Types, Structs, and Interfaces
- Pointers and Memory (3 labs): You can read pointer syntax, mutate shared state deliberately, and recognise a nil pointer before it becomes a crash.
- Arrays, Slices, and Maps (3 labs): You can choose arrays, slices, and maps for predictable collections and handle their zero values safely.
- Structs and Methods (3 labs): You can model tool data with structs, attach methods, and choose value or pointer receivers intentionally.
- Interfaces and Why They Are Implicit (3 labs): You can define small interfaces, satisfy them without declarations, and use that flexibility to test and compose tooling code.
- Type Assertions and the Empty Interface (3 labs): You can inspect an interface value safely, use any for truly mixed data, and avoid hiding useful types behind it.
Errors and Testing
- Errors as Values (3 labs): You can return errors, inspect them, and keep failure handling explicit in a command line tool.
- Wrapping Errors and errors.Is (3 labs): You can wrap an underlying error with context and test its identity with errors Is.
- Panics and Recover (3 labs): You can distinguish a programmer invariant from an expected operational error and use recover only at a deliberate boundary.
- The Standard testing Package (3 labs): You can write focused Go tests with the standard testing package and read failures as feedback about behaviour.
- Writing Table Driven Tests (3 labs): You can express many input cases in one table test and get a useful name for every failure.
Concurrency and Context
- Goroutines and Concurrent Execution (2 labs): You can start goroutines, wait for their work, and recognise the ownership questions concurrency introduces.
- Channels and Synchronization (2 labs): You can send values through channels, close them deliberately, and use channels as ownership boundaries.
- The select Statement (2 labs): You can wait on several channel operations and keep a concurrent worker responsive.
- The context Package (2 labs): You can pass context through a call chain and use its deadline and values at the right boundaries.
- Context Cancellation and Timeouts (2 labs): You can bound a concurrent operation with a timeout and return promptly when an orchestrator or caller cancels it.
The Standard Library for Tooling
- Files and the os Package (5 labs): You can read arguments and environment, read and write files safely, tell a missing file from a broken one, and set the exit code your pipeline branches on.
- Streams and the io Package (2 labs): You can copy streams, read bounded input, and treat files and network bodies through common interfaces.
- The time Package (2 labs): You can measure elapsed work, schedule ticks, and format timestamps without confusing a duration with a wall clock time.
- Parsing JSON with encoding/json (2 labs): You can decode API responses into structs, encode reports, and reject malformed input clearly.
- Calling APIs with net/http Client (2 labs): You can issue an HTTP request with a context, check the response, and close the body on every path.
Building CLIs and Services
- Parsing Arguments with flag (4 labs): You can build a command line tool with the standard flag package that takes typed options, reads positional arguments, falls back to environment variables, and fails with a usage message and the right exit code.
- Serving HTTP with net/http Server (2 labs): You can expose a small HTTP handler, return useful status codes, and configure a server with a timeout.
- Graceful Shutdown on SIGTERM (2 labs): You can stop accepting traffic on SIGTERM, cancel active work, and let a Go service finish cleanly.
- Building Static Binaries (1 lab): You can build a portable Go binary with reproducible flags and inspect the result before shipping it.
- Shipping in Scratch and Distroless Images: You can copy a static binary into a minimal image and choose the runtime files a service actually needs.
Project: End to End Health Checker
- Project Setup and Configuration (2 labs): You can start the health checker with typed configuration, clear defaults, and a small target model.
- Executing Concurrent Checks (2 labs): You can run checks concurrently, collect one result per target, and preserve a useful report order.
- Handling Timeouts and Errors (2 labs): You can give every check a deadline, classify failures, and keep one slow target from blocking the report.
- Exporting Results as JSON (2 labs): You can encode health results as stable JSON for pipelines, dashboards, and later automation.
- Containerizing and Testing the Final Build (1 lab): You can test the finished checker, build a small runtime image, and connect its exit status to an orchestrator.