A complete, step-by-step Go tutorial series. From your first “Hello World” to building production microservices with REST APIs, databases, and Docker. Every article has working code you can copy and run.
No complicated theory. Just simple explanations and real code.
Part 1: Foundations
Learn the building blocks of the Go language.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 1 | What is Go? | What Go is, why it matters, Go vs Rust vs Python vs Java |
| 2 | Installing Go | Setup, VS Code, Hello World, Go commands |
| 3 | Variables, Types, and Constants | var, :=, basic types, zero values, iota |
| 4 | Functions and Error Handling | Multiple returns, error type, defer, closures |
| 5 | Control Flow | if, switch, for, for range, labels |
| 6 | Arrays, Slices, and Maps | Slices, maps, append, make, range |
| 7 | Structs, Methods, and Composition | Structs, methods, embedding, constructors |
| 8 | Interfaces and Polymorphism | Implicit interfaces, type assertions, io.Reader |
| 9 | Pointers | &, *, pointer receivers, nil, Go vs Rust |
| 10 | Project Structure | cmd/, internal/, clean architecture, DI |
Part 2: Concurrency
Master Go’s killer feature — lightweight concurrency with goroutines and channels.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 11 | Goroutines | go keyword, WaitGroup, Mutex, race detector |
| 12 | Channels | Buffered channels, direction, range, deadlocks |
| 13 | Select, Context, and Patterns | select, context, fan-out, fan-in, worker pools |
| 14 | Error Handling Patterns | Error wrapping, Is/As, sentinel errors, errgroup |
Part 3: Web Development
Build and test production HTTP APIs.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 15 | net/http Server | HTTP handlers, JSON, routing, static files |
| 16 | REST APIs with Gin | Gin framework, routes, binding, groups |
| 17 | Testing | Table-driven tests, benchmarks, fuzzing, httptest |
| 18 | Middleware and JWT | Custom middleware, JWT auth, bcrypt, CORS |
| 19 | Database with sqlx | sqlx, PostgreSQL, transactions, connection pooling |
| 20 | File I/O | os, bufio, io.Reader, io.Writer, JSON/CSV files |
| 21 | API Best Practices | Validation, pagination, rate limiting, graceful shutdown |
Part 4: Advanced
Go’s advanced features and professional tooling.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 22 | Generics | Type parameters, constraints, real-world patterns |
| 23 | CLI Tools with Cobra | Cobra, Viper, flags, build a TODO CLI app |
| 24 | Docker for Go | Multi-stage builds, scratch images, Docker Compose |
Part 5: Production
Build and deploy real Go services.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 25 | Microservice Project | Complete CRUD service with Gin, sqlx, JWT, Docker |
| 26 | gRPC in Go | Protocol Buffers, streaming, interceptors, gRPC gateway |
Who is This For?
- Backend developers who want to learn Go for APIs and microservices
- Python/Java developers looking for better performance and simpler deployment
- Rust developers who want a simpler language for application-level code
- Anyone who wants to build fast, reliable backend services
How to Use This Series
Start from Tutorial #1 and go in order. Each tutorial builds on the previous one. If you already know Go basics, jump to Part 2 (Tutorial #11) for concurrency or Part 3 (Tutorial #15) for web development.
Need a quick reference? Check the Go Cheat Sheet.
Related Series
- Rust Tutorial — Learn Rust from scratch (great companion to this Go series)
- Kotlin Tutorial — Learn Kotlin from basics to advanced
- KMP Tutorial — Build cross-platform mobile apps with Kotlin
Source Code
All code from this series is on GitHub: kemalcodes/go-tutorial