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 :)

The *go-mock* script that covers this topic: 
https://gitlab.com/tymonx/docker-go/-/blob/master/scripts/go-mock

Project site: https://gitlab.com/tymonx/docker-go

I also hope, that it may be useful for someone ;)

Best regards,
*Tymoteusz Blazejczyk*
FPGA and Embedded Systems Design Engineer

[image: image] <+48797321888> +48 797 321 888 <+48797321888>
[image: image] <https://tymonx.com> www.tymonx.com <https://tymonx.com>
[image: image] <tymoteusz.blazejc...@tymonx.com> 
tymoteusz.blazejc...@tymonx.com
*NIP* PL 604 009 61 33 *| REGON* 385 865 948
[image: image] <https://gitlab.com/tymonx> [image: image] 
<https://github.com/tymonx> [image: image] <https://keybase.io/tymonx> [image: 
image] <https://t.me/tymonx> [image: image] <https://twitter.com/tymonxhq> 
[image: 
image] <https://fosstodon.org/@tymonx> [image: image] 
<https://www.linkedin.com/in/tymonx> [image: image] 
<https://tymonx.com/feed.xml>


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6c435ab6-1965-49e1-b1c9-f3f22bf46a70%40googlegroups.com.

Reply via email to