-
-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Description
Hi!
I went through the existing issues and was not sure whether one specific to supporting interfaces with generic types exists. I had a look at #168, but this is about generating mocks for types which package uses generics.
In sum, I would like to have an interface such as:
//go:generate moq -stub -out publisher_mock.go . Publisher
type Publisher[M any] interface {
Publish(ctx context.Context, msg M)
}
and be able to use a generic mock in my test:
publisher := PublisherMock[Something]{}
publisher.Publish(ctx, Something{})
Thank you!
breml, ai-zelenin, herlon214, fleipold, tbflw and 5 more
Metadata
Metadata
Assignees
Labels
No labels