A comprehensive Go learning guide. From basics to advanced topics, covering Go 1.18+ features including generics, and the latest Go 1.24/1.25 updates.
Important
Checkout the previous one-page version here
Table of Contents:
- 1. Quick Start
- 2. Documentation
- 3. Repository Structure
- 4. Advanced Topics (tips-notes)
- 5. Learning Path
- 6. Resources
- 7. Contributing
- 8. License
package main
import "fmt"
func main() {
fmt.Println("Hello, Gopher!")
}go run hello.go| Topic | Description | Level |
|---|---|---|
| Getting Started | Installation, first program, essential commands | Beginner |
| Basics | Variables, types, control structures, arrays, slices, maps | Beginner |
| Functions | Functions, closures, defer, panic/recover | Beginner |
| Packages | Creating packages, testing, useful packages | Beginner |
| Pointers | Pointers, allocation, conversions | Intermediate |
| Interfaces | Duck typing, methods, reflection | Intermediate |
| Concurrency | Goroutines, channels, patterns | Intermediate |
| Communication | IO, networking, command line | Intermediate |
| Modules | Go modules, workspaces, dependency management | Intermediate |
| Testing | Unit tests, benchmarks, mocking | Intermediate |
| Data IO | Readers, writers, formatted IO | Intermediate |
| Encoding | JSON marshaling, encoding | Intermediate |
| Web Programming | HTTP servers, forms, middleware, websockets | Intermediate |
| RPC and gRPC | Remote procedures, Protocol Buffers | Advanced |
| New Packages | unique package and more | Advanced |
golang/
├── README.md # This file (documentation hub)
├── README_onepage.md # Complete reference documentation (one-page version)
├── docs/ # Focused topic guides
│ ├── 01-getting-started.md
│ ├── 02-basics.md
│ ├── 03-functions.md
│ ├── ...
│ └── 15-new-packages.md
├── examples/ # Code examples by section (matches README_onepage numbering)
├── gobyexample/ # Examples by topic
└── tips-notes/ # Advanced tips and patternsDeep-dive guides for specific topics:
| Topic | Description |
|---|---|
| Concurrency Deep Dive | Goroutines vs threads, patterns, best practices |
| Error Handling | Error wrapping, custom errors, Go 1.13+ features |
| Context Usage | Context best practices, propagation |
| Dependency Injection | Testing and mocking patterns |
| Defer Patterns | Defer mechanics and gotchas |
| Pipelines and Cancellation | Pipeline patterns with context |
| Performance | Debugging and optimization |
| Build for Multiple OS | Cross-compilation |
| Shrink Binaries | Reducing binary size |
| Container CPU Throttling | GOMAXPROCS in containers |
- Getting Started - Install Go and write your first program
- Basics - Learn variables, types, and control flow
- Functions - Understand functions and closures
- Packages - Organize code into packages
- Concurrency - Master goroutines and channels
- Testing - Write effective tests
- Web Programming - Build web applications
- Error Handling - Handle errors properly
- Concurrency Patterns - Advanced patterns
- Performance Tuning - Optimize your code
- gRPC and Protobuf - Build RPC services
- New Packages - Latest additions to standard library
- Official Go Documentation
- A Tour of Go
- Go by Example
- Effective Go
- Go Code Review Comments
- Uber Go Style Guide
- 100 Go Mistakes
Contributions are welcome! Feel free to:
- Fix typos or errors
- Add new examples
- Improve explanations
- Add coverage for new Go features
