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.

#TutorialWhat You Will Learn
1What is Go? (Coming Soon)What Go is, why it matters, Go vs Rust vs Python vs Java
2Installing Go (Coming Soon)Setup, VS Code, Hello World, Go commands
3Variables, Types, and Constants (Coming Soon)var, :=, basic types, zero values, iota
4Functions and Error Handling (Coming Soon)Multiple returns, error type, defer, closures
5Control Flow (Coming Soon)if, switch, for, for range, labels
6Arrays, Slices, and Maps (Coming Soon)Slices, maps, append, make, range
7Structs, Methods, and Composition (Coming Soon)Structs, methods, embedding, constructors
8Interfaces and Polymorphism (Coming Soon)Implicit interfaces, type assertions, io.Reader
9Pointers (Coming Soon)&, *, pointer receivers, nil, Go vs Rust
10Project Structure (Coming Soon)cmd/, internal/, clean architecture, DI

Part 2: Concurrency

Master Go’s killer feature — lightweight concurrency with goroutines and channels.

#TutorialWhat You Will Learn
11Goroutines (Coming Soon)go keyword, WaitGroup, Mutex, race detector
12Channels (Coming Soon)Buffered channels, direction, range, deadlocks
13Select, Context, and Patterns (Coming Soon)select, context, fan-out, fan-in, worker pools
14Error Handling Patterns (Coming Soon)Error wrapping, Is/As, sentinel errors, errgroup

Part 3: Web Development

Build and test production HTTP APIs.

#TutorialWhat You Will Learn
15net/http Server (Coming Soon)HTTP handlers, JSON, routing, static files
16REST APIs with Gin (Coming Soon)Gin framework, routes, binding, groups
17Testing (Coming Soon)Table-driven tests, benchmarks, fuzzing, httptest
18Middleware and JWT (Coming Soon)Custom middleware, JWT auth, bcrypt, CORS
19Database with sqlx (Coming Soon)sqlx, PostgreSQL, transactions, connection pooling
20File I/O (Coming Soon)os, bufio, io.Reader, io.Writer, JSON/CSV files
21API Best Practices (Coming Soon)Validation, pagination, rate limiting, graceful shutdown

Part 4: Advanced

Go’s advanced features and professional tooling.

#TutorialWhat You Will Learn
22Generics (Coming Soon)Type parameters, constraints, real-world patterns
23CLI Tools with Cobra (Coming Soon)Cobra, Viper, flags, build a TODO CLI app
24Docker for Go (Coming Soon)Multi-stage builds, scratch images, Docker Compose

Part 5: Production

Build and deploy real Go services.

#TutorialWhat You Will Learn
25Microservice Project (Coming Soon)Complete CRUD service with Gin, sqlx, JWT, Docker
26gRPC in Go (Coming Soon)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.

Source Code

All code from this series is on GitHub: kemalcodes/go-tutorial