moq icon indicating copy to clipboard operation
moq copied to clipboard

Allow using goImport as source for moqs

Open K4L1Ma opened this issue 2 years ago • 0 comments

This pull request enables the utilization of goImport as a source for generating mocks. It enhances the flexibility and usability of the package by allowing developers to seamlessly create mocks from external dependencies, specifically those imported using goImport.

relates to https://github.com/matryer/moq/issues/79

this

moq -out snsapi_mocks_test.go -pkg mypkg $(go list -f '{{.Dir}}' github.com/aws/aws-sdk-go-v2/service/sns/snsiface) SNSAPI

can now be generated as

moq -out snsapi_mocks_test.go -pkg mypkg github.com/aws/aws-sdk-go-v2/service/sns/snsiface SNSAPI

K4L1Ma avatar Mar 18 '24 14:03 K4L1Ma