This page is a collection of useful links about Go.
Getting started
- Tutorial: Get started with Go - Start here.
- Effective Go - Continue here.
Documentation
- Documentation - Page with links to official documentation.
- Managing Go installation - Installing additional Go versions.
Go Wiki
- Go Wiki: Home - It is a collection of information about Go and a curated list of articles about Go.
- Go Wiki: All Wiki Pages - All articles.
Selected
- Code Review Comments - Common mistakes and best practices when writing code.
- Test Comments - Common mistakes and best practices when writing tests.
The Go Blog
- Strings, bytes, runes and characters in Go - Difference between string, []byte, rune , UTF-8 and how to iterate over them.
- Blog Index - All articles.
Style guides
Containers
- Multi-Stage builds - Multistage builds with Go.
Organizing code
- Organizing a Go module - Official one.
- Go Project Layout - It is not an official one, but it can be used to gather ideas on where to put some exotic parts of the repo.
Basic structures internals
Concurrency primitives
- Go sync.Mutex: Normal and Starvation Mode
- Go sync.WaitGroup and The Alignment Problem
- Go sync.Pool and the Mechanics Behind It
- Go sync.Cond, the Most Overlooked Sync Mechanism
- Go Singleflight Melts in Your Code, Not in Your DB
Other
- How I write HTTP services in Go after 13 years - Good ideas around building production quality Go HTTP services.
- Go Concurrency Patterns: Pipelines and cancellation - How to write a concurrent pipeline.
- Pipeline with errgroup package
- Package rheos provides generalized approach for this pattern.
- Ultimate Visual Guide to Go Enums and iota - All about Enums and iota.
- Using ldflags to Set Version Information for Go Applications - Injecting stuff during build time.
- v2 and Beyond - how to release a new major version:
- Go Error Propagation and API Contracts - TLDR; Errors are the part of your public interface too.
- Graceful Shutdown in Go: Practical Patterns - Handling signals for graceful shutdowns.