Post about Go development.

Better Table Tests in Go

Tuesday, October 21 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.

Read more »

Error assertions

Saturday, April 26 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.

Read more »

Improve your troubleshooting by aggregating errors

Saturday, June 11 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.

Read more »

Improve your troubleshooting by wrapping errors

Saturday, May 28 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.

Read more »

Keep your promises

Saturday, May 14 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.

Read more »