You cannot use gomock to generate mock objects because gomock is not included in the provided Go standard library source code, which only contains cgo, the compiler, and standard packages like bytes and log. The provided context describes cgo for calling C code, not mocking frameworks. To use gomock, you must first install the external tool and generate mocks for your specific interfaces using mockgen.
How to Use gomock for Generating Mock Objects
Gomock is not available in the provided Go standard library source code and must be installed separately to generate mock objects.