You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
generated repository should return concrete type instead of interface
currently NewUserRepository in example is returning interface.
However as suggestion in go codereview
Go interfaces generally belong in the package that uses values of the interface type, not the package that implements those values. The implementing package should return concrete (usually pointer or struct) types 1
*UserRepositoryMongo should be returned.
btw you can assert the implementation in test file
Is your feature request related to a problem? Please describe.
generated repository should return concrete type instead of interface
currently
NewUserRepository
in example is returning interface.However as suggestion in go codereview
*UserRepositoryMongo
should be returned.btw you can assert the implementation in test file
Describe the solution you'd like
return concrete type
Footnotes
https://go.dev/wiki/CodeReviewComments#interfaces ↩
The text was updated successfully, but these errors were encountered: