We are currently using matryer/moq in conjunction with //go:generate and Makefile. The generated files don't have the //go:build test annotation, so they end up in the application executable, which is not necessary. As far as I can tell, matryer/moq doesn't have a setting to fix this. We might consider mockery, which looks more flexible and is also centrally configurable via yaml-config.
We are currently using
matryer/moqin conjunction with//go:generateand Makefile. The generated files don't have the//go:build testannotation, so they end up in the application executable, which is not necessary. As far as I can tell,matryer/moqdoesn't have a setting to fix this. We might consider mockery, which looks more flexible and is also centrally configurable via yaml-config.