-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support embedded generic interfaces #13
Conversation
cc @sywhang |
Thanks @n0trace , I'll get to this shortly. |
Hey @n0trace and @sywhang - I have a similar PR in the origin repo: golang/mock#663 TIA for your consideration, and for taking over this great tool! |
} | ||
|
||
type Finder[T Clonable[T]] interface { | ||
Find(ctx context.Context) ([]T, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One case I think we should cover is variadic type parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Twenty(S, R) (T, Z) | ||
} | ||
|
||
type TwentyThree[U, V any] interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming: Could the more sophisticated types be named by their function instead of a number? It took some time for me to organize which cases were tested while reviewing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, you are right, i redesigned the case, including the additions under this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me after these comment! Thanks for adding the Variadic case and clearing up the function of the examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thank you for this work!
migrate golang/mock#669
fixes golang/mock#668 golang/mock#658 golang/mock#700