How to Use Mock Testing in Go

Mocking & Rocking - Power Up Your Go Testing

In this tutorial, we will use mock testing to improve the testing process in Go. We will talk about how to use mockgen to generate mock objects, and cover a few advanced techniques like mocking functions with interfaces, using testify/mock to simplify mock testing, mocking HTTP requests with httptest, etc.