Strategy pattern in Go

These days, I don’t build hierarchical types through inheritance even when writing languages that support it. Type composition has replaced almost all of my use cases where I would’ve reached for inheritance before. I’ve written about how to escape the template...

Strategy pattern in Go

These days, I don’t build hierarchical types through inheritance even when writing languages that support it. Type composition has replaced almost all of my use cases where I would’ve reached for inheritance before. I’ve written about how to escape the template...

Gotcha: Don't try and authenticate to URLs generated by GitHub Actions Artifacts v4

I recently spotted GitHub's announcement about the new v4 release for working with GitHub Actions Artifacts and impressed with the performance increase they mentioned, wanted to jump on it. However, I noticed that my API requests to fetch the uploaded artifacts have been failing...

Understanding a recent optimization to Go's <code>reflect.TypeFor</code>

Switching from S3 to Tigris on Fly.io

How I switched my side project from using Amazon S3 for file hosting to using Tigris (which is built on Fly.io infrastructure). It was a good experience overall, but there were a few quirks.

Routing Enhancements for Go 1.22

Go 1.22's additions to patterns for HTTP routes.

The one with Go 1.22 everywhere

#​495 — February 13, 2024 Unsub  |  Web Version Go Weekly Go 1.22 Released — Keeping in tradition with most even numbered Go releases landing in February, Go 1.22 is here! In theory, the upgrade is as simple as updating the version...

Go 1.22's go/types Alias type shows the challenge of API compatibility

Iterators in Go

The iterator proposal is a neat way to write “lazy loops”, where we never generate more results than we actually use. Let’s see what that would look like in Go programs.

Anemic stack traces in Go

While I like Go&rsquo;s approach of treating errors as values as much as the next person, it inevitably leads to a situation where there isn&rsquo;t a one-size-fits-all strategy for error handling like in Python or JavaScript. The usual way of dealing with errors entails returnin...