Hi Everyone!
Recently I have working on a project that allow to work on Go projects out-of-box using a Docker image.
It contains preinstalled tools for developing, mocking, formatting, linting, building, testing and documenting Go projects.
For mocking Go interfaces, I'm using the standard and classic mockgen tool in reflect mode. One of annoying thing about that tool is command line invocations.
I have scripted that to automatically and recursively detect all Go interfaces. It excludes _test.go files, mocks directories and the package main.
Go module detection is based on the go env GOMOD command invocation. All mocks are generated under the mocks directory for given Go package.
For me it works well. But I may have miss something. And because of that, I want to ask you for a small feedback. In advance, I appreciate it for any comments :)
I also hope, that it may be useful for someone ;)
Best regards,
Tymoteusz Blazejczyk
FPGA and Embedded Systems Design Engineer
NIP PL 604 009 61 33 | REGON 385 865 948