Unnest with Reflection in Go

Recently at work I needed to write a utility to sync a PostgreSQL database with another data source. In my attempts to make the synchronization efficient, I came across a very helpful StackOverflow question which explained how to perform bulk insertions and updates. The recommended solution looked something like this:

[Read More]

De-Duplicating Unit Test Setup

Go (or if you are using a search engine, Golang) has great unit testing functionality built directly into the language. Create a file ending in _test.go and define a function with the signature func TestMyFunction(*testing.T). Executing go test will now run any tests in the current package. Very easy. As an application grows however, the number of tests explodes and it maintaining organization becomes difficult. To solve this problem, while developing the new REST API at ExtraHop I began using GoConvey from the very gracious developers at SmartyStreets. [Read More]