Post about Go development.

Better Table Tests in Go

21 Oct 2025 go

Table-driven tests are a cornerstone of good unit testing in any language, Go included. They allow us to group related test cases, making it simple to cover numerous inputs, outputs, and edge cases in a concise and readable way. When you have functionality that needs to be exercised in a variety of ways, a table test is often the right tool for the job.

Error assertions

26 Apr 2025 testing go

When writing a Go test, don’t just assert that an error occurred - assert that the error you have is the one you expect.

Improve your troubleshooting by aggregating errors

11 Jun 2022 go

In the early days of the web, circa 1995 or so, it was common for the forms on websites to return a single error on submission, identifying only the first field that needed attention. This resulted frequent failed submissions as users would only be able to fix one thing at a time. To say that this made for a laborious and frustrating process would be a massive understatement.

Improve your troubleshooting by wrapping errors

28 May 2022 go

When managing errors in your code, help out your future self (and anyone else who will be supporting your code in the future) by doing more than the simplest possible thing.

Keep your promises

14 May 2022 go

One of the best ways to disappoint someone is to break a promise - and this applies both to the software we write and the applications we use as well.