Testing

Next level Go testing

Go makes it very easy to write tests. In fact, the test tool is built in the standard toolchain, and you can just run go test to run your tests, without installing extra dependencies or anything else. The testing package is part of the standard library, and it’s use, I’m happy to observe, is pretty wide spread.

Read more

Error handling and where Go2 gets it wrong

This is an article which I’ve struggled with for the past few weeks. It started plainly enough trying to write about unit testing in go, but there was a lot of overlap with error handling and a significant portion of that was taking a hard look at the Go2 error handling draft. I’ve written and re-written this article many times, where it morphed from advocating simple assertions in tests to make unit testing easier, to actually having a detailed look at where Go2 error handling falls short.

Read more