Why Your Go HTTP Handlers Should Carry Their Own Deadline
Go handlers that outlive their clients leak goroutines and connections. context.WithTimeout bounds the damage — if you propagate it correctly and pick the deadline from real latency data.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Go handlers that outlive their clients leak goroutines and connections. context.WithTimeout bounds the damage — if you propagate it correctly and pick the deadline from real latency data.
Should a new Go library use generics, interface{}, or reflection? Compare type safety, allocations, and version constraints, with a concrete generic example and benchmark validation.
Learn how Fiber’s radix‑based router handles HTTP method‑specific routes and path parameters, the pitfalls of route ordering, and a hands‑on example to validate your setup.
Go 1.22 adds method and wildcard routing to net/http's ServeMux, letting you drop chi or gorilla/mux for many services. This post shows the new patterns, PathValue extraction, precedence rules, and a zero‑dependency CRUD example.
Ensure Go HTTP handlers honor client cancellations and server timeouts by propagating context, handling ctx.Done, and returning 499/504 status codes. Follow this step‑by‑step guide with code examples and verification checks.
Go infers generic type arguments by unifying call-site argument types with type parameters — conservatively. Here's how it works, where it gives up, and how to design APIs that infer cleanly.
Go 1.21's log/slog replaces hand-rolled JSON loggers: a worked JSONHandler setup, runtime level changes with LevelVar, ReplaceAttr redaction, context trace IDs, and the !BADKEY and performance pitfalls to avoid.
Go 1.18 generics let you write a single concurrent cache that the compiler instantiates per key-value type pair, catching mismatches at build time. This post shows a working implementation, a two-cache example, and the trade-offs around binary size.
Pick the right tool for extracting Go dependency graphs in CI. Compare Sema, go mod graph, golangci‑lint, and custom scripts, then see a step‑by‑step CI implementation and verification checklist.