- 将 RegisterService.Run 方法的请求参数类型从 RegisterResp 改为 RegisterReq - 更新 register_test.go 中的测试用例,使用正确的请求参数类型 - 修改 user.proto 中 Register rpc 的请求参数类型
21 lines
456 B
Go
21 lines
456 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
user "github.com/suyiiyii/hertz101/rpc_gen/kitex_gen/user"
|
|
)
|
|
|
|
type RegisterService struct {
|
|
ctx context.Context
|
|
} // NewRegisterService new RegisterService
|
|
func NewRegisterService(ctx context.Context) *RegisterService {
|
|
return &RegisterService{ctx: ctx}
|
|
}
|
|
|
|
// Run create note info
|
|
func (s *RegisterService) Run(req *user.RegisterReq) (resp *user.RegisterResp, err error) {
|
|
// Finish your business logic.
|
|
|
|
return
|
|
}
|