Skip to content

2021

A tour of goose up and down commands

A while ago a co-op student, who happened to be a visual leaner, asked if it were possible to explain goose commands visually. At the time we were still at an office, so we gathered around the whiteboard and doodled some diagrams.

This post captures some of those whiteboard sketches, which seemed to help.

Better tests with containers

Managing state is hard. Managing database state is even harder. And coordinating state within a test suite is just always a bad time.

But it doesn't have to be this way!

There is a fantastic Go package called ory/dockertest that allows you to spin up ephemeral docker containers. It'll work both locally (assuming you have Docker installed) and in your Continuous Integration (CI) pipelines.

Embedding migrations

Embedding migrations

Go continues to be boring while sprinkling quality of life features. One of the recent additions was the ability to embed files at compile time. Click here for go1.16 release notes.

Sine many users compile goose themselves, this new embed feature paves the way for embedding SQL files directly into the goose binary. This was already possible with existing tools, however, now that embedding is part of the standard library it's never been easier to offer this feature.