package svc import ( "context" "dcg/app/user_center/usercenter" "dcg/config" "github.com/zeromicro/go-zero/zrpc" ) type ServiceContext struct { Ctx context.Context UserCenterRpc usercenter.UserCenter } func NewServiceContext() *ServiceContext { svc := &ServiceContext{ Ctx: context.Background(), // rpc UserCenterRpc: usercenter.NewUserCenter(zrpc.MustNewClient(config.Config.UserCenterRpc)), } return svc }