Day 4 - Golang testing
It was inevitable that the high of yesterday’s ease in getting running with Golang would come crashing down at some point. The crash came as soon as I got completely lost trying to understand how to write a stupid little test to cover what little logic there is so far in my little
Ended up getting it working but I still am not 100% certain how and why. One convention I have a strong distaste for is the implicit denoting of test files by suffixing them with
_test. So my test file for
systips_test.go. It’s one of those things that is fine if you know what’s going on, but as a newcomer when I learn there are implicit flags that can determine the structure of your project, I immediately wonder what other implicit features there are that I just haven’t seen yet. That spirals pretty fast when you start wondering what other implicit things can I accidentally change to break my project/build?
But I’m not down on Go (yet), it does seem to have a lovely community and I’ve only just peeked in.
I mentioned in the first post that I used Hugo and Netlify to generate and host this site respectively, though I have barely read the documentation for either one. That’s a substantial merit to both of them, I love a tool that I can kick out the door for a simple case and come back to explore the more in depth stuff later.
On that note, I’d like to set up some sort of metrics reporting for the site to see what, if any traffic I’m getting. Another item for my Things I Want to Do list!