Tag code-review

featured.jpg

Is my interface too big?

In this article, I explain how you can detect if the interface you’re using is getting too big and requires splitting into smaller ones. Smaller interfaces help to improve the maintenance and readability of the code. What’s more, it helps with understanding the code. Panics in mocks If you’re generating/writing mocks and some of the methods have empty implementation or a panic inside, you’re probably incorrectly segregated interfaces. This code is a good suggestion that you have more than one responsibility in the code and you’re trying to test one of them.