
Build a CRUD REST API in Go With the Standard Library
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.
Designing JSON, REST and gRPC interfaces that other people have to live with: versioning, pagination, validation, errors and clients.

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.

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.

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.

Build a webhook receiver in Go that checks an HMAC signature on the raw body, rejects stale and replayed events, answers fast and processes in the background.

Compare URL, header, media type and date-based API versioning in Go, with one handler serving two views, a frozen v1 test and Sunset headers.

Generate a Go net/http server from an OpenAPI file with oapi-codegen: config, the interface, validation middleware and what generated code leaves unchecked.

Build a typed Go client for a JSON API: context on every call, one generic request helper, an APIError you can test with errors.Is, and paging as an iterator.

Make JSON API revalidation cheap in Go: ETags from a revision column, collection tags, exact If-None-Match matching, 304 headers and 10x less work.

Validate Go API requests with a small collector: JSON Pointer paths, nested fields, cross-field rules, rune-aware lengths and 340 ns for a valid order.

What Go's experimental encoding/json/v2 changes: case-sensitive keys, rejected duplicates, empty arrays for nil slices, Duration formats. v1 unchanged.

Build a small OAuth 2 server in Go: client credentials, authorization code with PKCE, exact redirect matching, single-use codes and a scope-checking API.

REST API design rules for Go services, from URLs and methods to errors, paging and versioning, with a small linter that checks the URL rules.
We send one email when a new article is published. No spam.