
Filtering and Sorting in Go APIs Without SQL Injection
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.
Everything you need to level up your coding skills.

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.

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.

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

Build a pastebin in Go on SQLite with unguessable IDs, expiry, burn after read that survives link previews, delete tokens and output that cannot run scripts.

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.

Build a URL shortener in Go on SQLite with random base62 codes, collision retries, custom aliases, expiry, hit counting and tests for the awkward cases.

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.

Meter API usage and enforce quotas in Go: an atomic conditional UPDATE, idempotent events, weighted routes, refunds for 5xx, UTC periods and reconciliation.

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.

Build a CRUD API in Go with the standard library: a natural key, PUT upserts, ETag and If-Match locking, and a store contract tested on memory and SQLite.

Add full-text search to a Go site with SQLite FTS5: stemming, bm25 ranking, highlighted snippets, search as you type and safe handling of raw user queries.
We send one email when a new article is published. No spam.