Recently I’ve been investing more time in refactoring and creating unit and integration tests for GoBlog. After all, I don’t want to just make sure my blog is working properly through trial and error, I want to be able to prove that with automated tests.
I admit it is the first time I am writing code that is almost 100% covered by unit tests. But it’s such a good feeling to have small, concise methods whose functionality you can rely on. Even before I have a running application, I know that what is already written will work. And unit testing with Go is really fun.