Recent writing
Longer articles, short notes, and things I'll probably need to look up again.
Browse the archiveOctober 6, 2024
goWriting a circuit breaker in GoBuild a production-ready circuit breaker in Go from scratch with closed, open, and half-open states to prevent cascading failures.
March 6, 2024
goDysfunctional options pattern in GoDiscover a simpler alternative to functional options: method chaining with builder-style configuration that's 76x faster and easier to understand.
September 5, 2023
goConfiguring options in GoCompare three Go option patterns: exposed structs, option constructors, and functional options. Learn when to use each for clean APIs.
August 23, 2023
goLimit goroutines with buffered channelsControl goroutine concurrency with buffered channels as semaphores. Prevent resource exhaustion with backpressure patterns in Go workers.
August 18, 2023
goInterface guards in GoUse compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.
August 10, 2023
goGo structured logging with slogMaster Go 1.21's log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.