Open Linde7777 opened 6 months ago
Is your feature request related to a problem? Please describe. I need to write unit-test, which need gomock, and it need interface
Describe the solution you'd like
package logic type UserLogic interface { UserCreate(in *user.UserReq) (*user.UserResp, error) UserDelete(in *user.UserReq) (*user.UserResp, error) } type UserLogicV1 struct { UserRepo repository.UserRepository } // compile-time checking if UserLogicV1 implement UserLogic interface var _ UserLogic = (*UserLogicV1)(nil) // return the concrete implementation instead of interface, as Go style suggests func NewUserLogicV1(userRepo repository.UserRepository) *UserLogicV1 { return &UserLogicV1{ UserRepo: userRepo, } }
Describe alternatives you've considered currently no
Additional context currently no
not support yet, and no plan to support, define a template in logic.tpl maybe a good choice.
Is your feature request related to a problem? Please describe. I need to write unit-test, which need gomock, and it need interface
Describe the solution you'd like
Describe alternatives you've considered currently no
Additional context currently no