Spotlights

Short tips, essays, and news about working with Go and software development.

A demo-friendly web server

Or: don't hard-code your demo server port to 8080. Let it choose the next available port instead.

Domains for local dev servers

Instead of accessing your local dev servers through different port numbers, use Caddy to access them through separate domains.

3 Go anti-patterns

Don't do this or you must go to bed without committing your code.

Containers from scratch?

Containers manage binaries and their supporting libs. Pure Go binaries don't need any external libs. Is the `scratch` image the right choice?

Don't Select the Default

In a select block, don't be tempted to add a default case as a "fallback" or it might turn into a busy loop.