Ship production-ready Go binaries with confidence — write table-driven tests and benchmarks, measure coverage, then compile small static binaries, cross-compile for any platform, and package a service in a lean Docker image. You finish able to take Go source and turn it into a tested, configurable, deployable artifact.
Watch the free preview
The testing package and go test — free to watch, no account needed.
What you'll learn
- Ship production-ready Go binaries from tested source to a deployable artifact
- Write table-driven tests and benchmarks with the standard testing package
- Measure and interpret test coverage to find untested code paths
- Build small static binaries and cross-compile them for other platforms
- Dockerise and configure a Go service for reliable deployment
Syllabus
Testing Fundamentals in Go
The testing package and go testFree preview
Table-driven tests
Measuring and Optimising Tests
Benchmarks with testing.B
Test coverage
Building Go Binaries
Building static binaries
Cross-compilation
Containerising and Deploying
Dockerising a Go app
Configuration and deploying a service
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10