I used to spend an unreasonable amount of time thinking about how to begin writing a test. A deconstructed ship — Deutsches Technikmuseum, BerlinThis post comes from my blog: https://pierreprinetti.com/blog/2018-a-pattern-for-go-tests/ I googled test patterns in Go.Many people seem to rely on external dependencies for assertions. And in fact, I understand that generic (aha!) functions like isNil(v
![A pattern for Go tests](https://cdn-ak-scissors.b.st-hatena.com/image/square/2903c7ae68605952f046965ae27e55dd1d27609f/height=288;version=1;width=512/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A1200%2F1%2Axe_NkUsA9p5ymi0d3_aZ6A.jpeg)