Subscribe
Fenix

Technologies, Hacks and Games...

Latest posts

Golang Tutorial 13: Packages and modules

Packages and modules in Go 1.27: go mod init and tidy, go.sum, exported names, internal/, versions and /v2 paths, replace for local work, go work workspaces and tool dependencies, all run for real with the output I got, plus an exercise.

10 min read

Zero-downtime schema changes with expand and contract

Changing a busy Postgres table without stopping the app: the lock queue that turns a 1 ms ALTER into an outage, lock_timeout, fast defaults, NOT NULL as NOT VALID in Postgres 18, renaming a column with expand and contract, batched backfills and CREATE INDEX CONCURRENTLY.

7 min read

Writing a reusable Terraform module

Building a small VPC module in Terraform with inputs, validation and outputs, calling it from two root modules with different settings, and pinning it to a git tag so a change to the module can't surprise a project that didn't ask for it.

7 min read

Golang Tutorial 12: Error handling

Errors as values in Go: wrapping with %w, errors.Is, errors.As and the new errors.AsType, sentinel vs typed errors, errors.Join, when a panic is fine, and a new Go 1.27 vet check for wrapped error pointers. Runnable examples and an exercise.

10 min read

GitLab CI from zero: stages, jobs, artifacts and caches

A first .gitlab-ci.yml for shorty, the Go URL shortener: stages, jobs, workflow rules, a Postgres service, test reports and the difference between artifacts and caches. Checked locally with gitlab-ci-local and the real job commands.

7 min read