
API Documentation in Go With Swagger UI Embedded in Binary
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.
Everything you need to level up your coding skills.

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.

How Go's HTTP client reads HTTP_PROXY, HTTPS_PROXY and NO_PROXY, which hosts it never proxies, why runtime changes are ignored, and how to set one yourself.

Build an admin dashboard in Go with templ, HTMX and Tailwind classes: a shell, stat cards, a sortable paged table, role aware buttons and server side checks.

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.

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.

Route api, admin and www hosts to different handlers with one http.ServeMux by putting the host in the pattern, and learn how it treats ports and case.

Build a dashboard in Go with html/template and HTMX: fragments chosen by the HX-Request header, polling cards, filters, a retry button and HX-Trigger.

Serve a 200,000-row JSON export in Go by streaming rows from the database: first byte in 1 ms instead of 161, 1 MB of heap instead of 57, and gzip on the fly.

Walk through every http.Transport field that matters in production, with the default value, what changing it does and measured effects of connection limits.

Test templ components with golden HTML files and an update flag, add structural checks that parse the output with x/net/html, and read a failure message.

Meter API usage and enforce quotas in Go: an atomic conditional UPDATE, idempotent events, weighted routes, refunds for 5xx, UTC periods and reconciliation.
We send one email when a new article is published. No spam.