
Idempotency Keys in Go APIs for Safe Client Retries
Make POST safe to retry in a Go API with an Idempotency-Key middleware: concurrent duplicates, replayed responses, payload fingerprints and 5xx handling.
Everything you need to level up your coding skills.

Make POST safe to retry in a Go API with an Idempotency-Key middleware: concurrent duplicates, replayed responses, payload fingerprints and 5xx handling.

Write liveness, readiness and startup endpoints for a Go service: what each should check, how to bound dependency checks, and how readiness fits shutdown.

A one page Go HTTP cheat sheet: server settings, routing, JSON helpers, middleware, shutdown, a safe client, status codes and headers, all run together.

Generate a typed Go client from an OpenAPI file with oapi-codegen, then wrap it: auth by request editor, Go errors from problem documents and a drift check.

Download a large file in Go into a partial file, report progress, resume with Range and If-Range after a failure, and rename it into place when complete.

Build a todo app in Go with templ, HTMX and SQLite where every action works as a plain form post and upgrades to fragment updates, with tests for both paths.

Design bulk endpoints in Go: atomic versus partial modes, per-item results by index, savepoints, idempotent refs, limits, and 100 creates in 1.2 ms not 18.

Load Go web app configuration from defaults, a file, environment variables and flags in a fixed order, read secrets from files and report every error at once.

Use go-playground/validator in a Go API: tags, nested rules, JSON field names in errors, and the traps around zero values, dive, panics and per-call setup.

Resolve the tenant from the Host header in a Go server, with subdomains and custom domains, safe fallbacks, a context value and rules for unknown hosts.

Internationalize a Go web app with embedded JSON catalogs and golang.org/x/text: language negotiation, plural forms, number formats and missing translations.

Stream JSON in Go without loading it all: an iterator over a top-level array, NDJSON with a Decoder, element-by-element encoding and a live heap of 0.02 MB.
We send one email when a new article is published. No spam.