Closed alexisvisco closed 2 years ago
In some cases, I used type aliases for this use case like this:
package myreader
import "io"
//go:generate moq -out reader_mock.go . Reader
type Reader = io.Reader
thanks @breml - another option is to copy the interface into your own project. This isn't a hack per se, some people like to do this anyway as it allows them to provide multiple implementations of something in their project.
Hi, I am wondering if it's possible to generates mock for external library, if it's possible how to do it ?