
Webhook Design for Go APIs That Customers Can Trust
Design webhooks customers can trust in Go: an event envelope, per-endpoint API versions, filters, secret rotation, auto-disable, replay and signing.
Everything you need to level up your coding skills.

Design webhooks customers can trust in Go: an event envelope, per-endpoint API versions, filters, secret rotation, auto-disable, replay and signing.

Build filter and sort parameters for a Go API from an allowlist: bound values, mapped columns, escaped LIKE wildcards and a blind injection through ORDER BY.

Compare code-first and spec-first OpenAPI in Go with working code: huma generating the spec from types, and kin-openapi catching bad requests and drift.

Cache API data in Redis from Go: cache-aside with singleflight, a version fence against stale writes, namespace versions for lists and TTL jitter, on Redis 8.

Return Go API errors as RFC 9457 problem documents: a Problem type with extensions, one table mapping errors to statuses, and a 500 that leaks nothing.

Decode request JSON strictly in Go: DisallowUnknownFields, a single-value check, body limits and a map from decoder errors to 400, 413 and 422 answers.

Build short-lived JWT access tokens and rotating refresh tokens in Go: pinned verification, hashed storage, reuse detection and a concurrent refresh trap.

Build a JSON API in Go from a written contract: standard routing, one error format, strict decoding, validation, cursor paging, PATCH, auth and tests.

Implement PATCH in a Go API with merge-patch semantics: tell absent, null and zero apart, apply only the keys sent and reject bad patches before any SQL runs.

Serve interactive API docs from a Go binary: Swagger UI embedded with swgui, the spec via go:embed, a password gate, CSP caveats and a build tag.

Run long work behind a Go API with 202 Accepted: a bounded worker pool, a pollable job resource, Retry-After, idempotency keys, cancellation, clean shutdown.

Paginate a Go API with offset, keyset and signed cursors on SQLite: duplicates under inserts, rows lost on tied keys, and 7.9 ms against 31 µs at depth.
We send one email when a new article is published. No spam.