Go

Writing a circuit breaker in Go

Build a production-ready circuit breaker in Go from scratch with closed, open, and half-open states to prevent cascading failures.

ETag and HTTP caching

Implement client-side HTTP caching with ETag headers. Learn If-None-Match, 304 Not Modified responses, and weak validation in Go servers.

Crossing the CORS crossroad

Troubleshoot CORS errors with this practical guide. Learn Access-Control-Allow-Origin headers, preflight requests, and domain allowlisting in 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.

Strategy pattern in Go

Replace inheritance with the Strategy pattern in Go using interfaces. Achieve composable, testable code without class hierarchies.

Anemic stack traces in Go

Learn how to build custom error types in Go to create stack traces without runtime overhead, inspired by Rob Pike's Upspin error handling.

Retry function in Go

Build retry logic in Go without reflection using generics. Implement exponential backoff and configurable retry strategies with type safety.

Eschewing black box API calls

Why you should define API response structures explicitly. Compare approaches in Python, JavaScript, and Go with Pydantic, Zod, and structs.

Rate limiting via Nginx

Implement rate limiting at the infrastructure layer with Nginx reverse proxy. Protect Go services from DDoS with leaky bucket algorithm.

Reminiscing CGI scripts

Build a CGI script from scratch using Go's stdlib and Bash. Understand why Common Gateway Interface fell out of favor for modern web apps.

Configuring options in Go

Compare three Go option patterns: exposed structs, option constructors, and functional options. Learn when to use each for clean APIs.

Search and navigate

Navigate