Go
Notes on the Go programming language — interfaces, concurrency, testing, and patterns that have held up in production.
- go
Dysfunctional options pattern in Go
Discover a simpler alternative to functional options: method chaining with builder-style configuration that's 76x faster and easier to understand.
- go
Configuring options in Go
Compare three Go option patterns: exposed structs, option constructors, and functional options. Learn when to use each for clean APIs.
- go
Limit goroutines with buffered channels
Control goroutine concurrency with buffered channels as semaphores. Prevent resource exhaustion with backpressure patterns in Go workers.
- go
Interface guards in Go
Use compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.
- go
Go structured logging with slog
Master Go 1.21's log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.