How to add mocks for internal packages using configuration? #664
-
Hi,
I'm using while using Any idea to generate the mocks and I can import it in other packages? Thanks a head! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Because you can utilize go templating in the dir: mocks/{{ replaceAll .PackagePath "internal" "internal_" }} You're also free to generate your mocks next to the interface: https://vektra.github.io/mockery/latest/features/#layouts |
Beta Was this translation helpful? Give feedback.
Because you can utilize go templating in the
dir
variable, you can use one of our provided template functions to replace the name of "internal" to something else. It might be something like (untested):You're also free to generate your mocks next to the interface: https://vektra.github.io/mockery/latest/features/#layouts