Application
223 articles
Contextual Logging with slog
Learn contextual structured logging in Go using log/slog (Go 1.21+). Covers custom slog.Handler, structured JSON output, and injecting trace IDs from context into every log entry.
Side Effects of Go's response.WriteHeader
Learn why calling Go response.WriteHeader multiple times triggers the superfluous call warning. Covers how the first status code wins and how to fix duplicate WriteHeader in HTTP handlers.
Proposal to Extend ServeMux Functionality in Go Accepted
The proposal to add dynamic routing and path parameters to Go net/http ServeMux was accepted. Learn what this means for third-party routers like goblin and the future of routing in Go.
100 Tips for Go: How to Address Common Developer Mistakes
100 Tips for Go: How to Address Common Developer Mistakes
About Go's http.RoundTripper
Learn what Go http.RoundTripper interface is and how to use it as HTTP client middleware. Includes a custom RoundTripper for request logging and response latency measurement.
Implementing Fan-In and Fan-Out in Go
Implement fan-in and fan-out concurrent patterns in Go using channels and goroutines. Fan-in aggregates multiple producer outputs; fan-out distributes one input across multiple workers.
About Template Method and Strategy Patterns
Master Template Method and Strategy patterns—two behavioral design patterns for controlling process flow and runtime method selection.
Distributed Services with Go
Distributed Services with Go
Practical Go Language
Practical Go Language
Challenges with Recursion
Understand recursion challenges involving return statements and call stack evaluation with practice strategies.
Programmer Brain
Programmer Brain
A Book to Train Your Programming Mind
A Book to Train Your Programming Mind
Deployment Strategies Explained: Blue-Green, Canary, Rolling, and More
Compare blue-green, canary, rolling, and recreate deployment strategies. Learn when to use each one and how they minimize downtime and reduce deployment risk.
Continuous Profiling with Pyroscope
Explore continuous profiling with Pyroscope. Learn server setup, pull-based profiling, retention configuration, and Grafana integration methods.
How to Use pprof Without DefaultServeMux
A note on using net/http/pprof with routers other than Go's default router.
Prevent URL Encoding in Go's html/template
Learn why Go html/template auto-encodes URLs and how to use template.URL to pass raw URLs in templates without triggering automatic HTML encoding. Includes a minimal working example.
Cross-Compiling Go Application Images with buildx
Learn Docker buildx multi-architecture compilation for Go apps. Build cross-platform images for Linux AMD64 and ARM64 targets.
Current Status of FuelPHP as of March 2023
A summary of the current status of FuelPHP as of March 2023.
Relearning Go
Strengthen Go coding skills by reviewing comprehensive language specifications, generics implementation, and Go 1.18+ features thoroughly.
Implemented a Benchmark for Comparing Go HTTP Routers
A benchmark tool to compare the performance of various Go HTTP Routers.