
Connection Reuse and Keep Alive in the Go HTTP Client
See when the Go HTTP client reuses a connection and when it dials a new one, using httptrace, and how idle timeouts and Connection close change that.
Everything you need to level up your coding skills.

See when the Go HTTP client reuses a connection and when it dials a new one, using httptrace, and how idle timeouts and Connection close change that.

Set up a fast templ edit loop: generate in watch mode, see text edits land without a restart, format with templ fmt, and set up the language server and CI.

Rate limit a Go API per key and per route with token buckets: weighted costs, 429 with Retry-After, idle sweeping, a fake test clock and 123 ns decisions.

Pick a Go web framework by what you are building: standard library, chi, gin, echo, fiber or huma, compared on dependency weight, handler portability and fit.

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.

See what Go gives you for HTTP/2 and HTTP/3 with no extra code, count connections to prove multiplexing, and use cleartext h2c with http.Protocols.

Render Markdown in Go with goldmark safely: what defaults block, what WithUnsafe lets through, and how to sanitize output with bluemonday for user content.

A tour of encoding/json in Go: struct tags, omitempty and omitzero, nil versus empty, time and bytes, int64 precision, HTML escaping and measured speed.

Choose Cache-Control values for fingerprinted assets, HTML pages, API responses and private data in a Go server, and set them from one small middleware.

Build nested templ layouts with children, component slots, optional slots, conditional attributes, a script emitted once and data from the context.

Build Go API authentication with one Principal and three mechanisms: hashed API keys, signed bearer tokens and cookie sessions, with 401 versus 403 and CSRF.

Call handlers directly with httptest.NewRecorder and NewRequest, set path values by hand, fake the store behind them, and assert on status, headers and JSON.
We send one email when a new article is published. No spam.