This is a step-by-step tutorial designed with the help of ChatGPT.
It walks through the design and implementation of a simple banking system in Go, with each part building incrementally on top of the previous one.
It is designed to guide mid-to-senior engineers through building a real-world backend system from scratch β a banking platform β using idiomatic Go, clean architecture principles, and test-driven development.
The purpose is to help experienced Go developers refresh their knowledge through practical, progressive exercises β with a focus on writing production-quality code, structuring real-world projects, and revisiting concurrency, interfaces, and clean design.
- TBD
- Core banking logic (accounts, transfers)
- Clean interfaces and structs
- Transfer pipelines with decorators and mixins
- An async job processor (fan-in/fan-out, concurrency patterns)
- A testable, composable transfer engine
- A full HTTP API (routes, JSON I/O, handlers)
- End-to-end integration tests
- Monitoring/debug endpoints for observability
Each part is implemented in a dedicated branch named partX (e.g. part1, part2, ... part8).
| Part | Branch | Focus |
|---|---|---|
| 1 | part1 | Syntax & Language Fundamentals |
| 2 | part2 | Structs, Methods, Interfaces |
| 3 | part3 | Error Handling, Testing, Tooling |
| 4 | part4 | Application Structure, Project Organisation, and CI/CD Readiness |
| 5 | part5 | Functional Composition, OO Patterns, and Advanced Struct Techniques |
| 6 | part6 | Concurrency, Channels and Project Architecture |
| 7 | part7 | Interface Composition, APIs, and I/O Integration |
| 8 | part8 | Common Golang gotchas |
π‘ You can check out any part using
git checkout partX.
Clone the repo and initialise your Go module:
git clone https://github.com/smartrics/golang-tutorial.git
cd golang-tutorial
git checkout part1 # or any part you want to start from
go mod tidyNote: Use your own module path if you're adapting the tutorial.
- Test-first (TDD) development
- Realistic banking domain use case
- Clean architecture + Hexagonal layering
- Async processing, observability, and end-to-end testing