Failing to build a useful pre Go 1.21 static Go toolchain on Linux

Announcing GoReleaser v1.17 — the late Easter release

The Easter release is here!

Go 1.21 will (likely) have a static toolchain on Linux

Interfaces 101 : Extensible API Handlers Ep. 10

Introduction In episode 9, Miki discussed how a command flag can be decoded into a user defined type with the Value interface. As a recap, the Value interface consists of two methods: one for serializing the underlying concrete type and one for deserializing a string into an obje...

The adapter pattern in Go

How do you test a database without a database? Don't worry, this isn't one of those Zen puzzles. I have something more practical, but equally enlightening, in mind. Let’s use the adapter pattern to solve the riddle.

Moving from 'master' to 'main' in Git with local changes

Generating `Equal` methods for Go structs with `goderive`

Sometimes you need to check the equality of two structs in Go, and depending on how complicated they are, you probably want to avoid hand-writing the Equal method if possible, and you want to avoid reflect.DeepEqual for performance reasons, at least in your production code. If I...

Interfaces 101 : Parsing Command Flags Ep. 9

Introduction In episode 8, Miki developed a Go HTTP client that had a method to check the health of a theoretical API. The method would construct the request URL and return an error based on the response code received from the server. Miki then created a type that would mock Go�...

Interfaces 101 : Testing with a Mock Interface Ep. 8

Introduction In episode 7, Miki discussed design considerations to keep in mind while creating interfaces in Go with the first idea he proposed being that an interface should represent what we need from a type, and not what is stored on the type. To add some clarity to this thoug...

The bits of Go we avoid (and why) Podcast

I was on episode 269 of the Go Time podcast, talking about the bits of Go we avoid (and why). Check it out!