The Go toolchain at a glance
Go is the language of cloud infrastructure — Docker, Kubernetes, Prometheus, Terraform and etcd are all written in it — so a Go job nearly always means Go plus HTTP, a database, containers and observability. These labs show the smallest real version of each. Code that needs a third-party module (go get …) is shown as a static snippet; code that needs only the standard library is a verified example you can run as-is.
| Tool | Go package you use | You meet it when |
|---|---|---|
| net/http, Gin | net/http, github.com/gin-gonic/gin | Writing any HTTP API |
| PostgreSQL | database/sql + github.com/jackc/pgx/v5 | Any service that stores data |
| Redis | github.com/redis/go-redis/v9 | Caching, rate limits, sessions |
| Docker | CGO_ENABLED=0 go build | Shipping the binary |
| Kubernetes | /healthz, /readyz handlers, graceful shutdown | Running it in production |
| Prometheus + Grafana | github.com/prometheus/client_golang | Dashboards and alerts |
| Kafka | github.com/segmentio/kafka-go | Event-driven services, data pipelines |
| Git + GitHub Actions | go vet, go test -race in CI | Every pull request |
mkdir orders && cd orders
go mod init github.com/you/orders # creates go.mod
go get github.com/gin-gonic/gin@latest # adds a dependency to go.mod and go.sum
go mod tidy # add what is imported, drop what is not
go run . # build and run the package in this folderEvery lab below lives in a module like this one. Module 09 explains go.mod and go.sum.
