A couple of neat Go Tricks

Go Tricks

Last week I was privileged to give a talk to the Singapore Gophers meet up held at the GrabTaxi Singapore Tech Office.

The talk was titled “Dependency Injecting (and Testing)” and was inspired by this great article by Karl Seguin.

In it I discuss how you can use DI to test and a simple trick to replace DI with “mock functions” for greater separation between packages.

And for those that last until the end, I also share other trick on how to use panic() to achieve cleaner code and write less if err != nil blocks.

Please enjoy this video and feel free to ping me with feedback.