May 9, 2020

21 tips to write better go tests

I have found the following tips to be generally useful in writing and working with go unit tests. They are not in any particular order: Use “t.Helper()" method to reduce the amount of noise in error reports. By calling the method a function is marked as a test helper function. Write a table-driven unit test. In most cases, this is a logical approach. Each table entry has a set of input and expected result(s). Read more

December 12, 2019

How I setup my blog with Hugo

What a better way to kick-start this blog than to share some tips on how I got it up and running. My set of requirements for the blog is, for it to be: low maintenance, database free, source controlled, static (markdown powered) and requiring minimal server-side setup. Hugo Hugo is first up on the list. It is Golang written, fast, open-source static file generator. It ticks the static and markdown requirement boxes on my checklist. Read more

© Habtom Giorgis 2019