LaurenceLiZhixin commented on a change in pull request #214:
URL: https://github.com/apache/dubbo-go-samples/pull/214#discussion_r700692539
##########
File path: rpc/jsonrpc/go-client/pkg/user.go
##########
@@ -34,18 +34,18 @@ type JsonRPCUser struct {
func (u JsonRPCUser) String() string {
return fmt.Sprintf(
"User{ID:%s, Name:%s, Age:%d, Time:%s, Sex:%s}",
- u.ID, u.Name, u.Age, time.Unix(u.Time, 0).Format("2006-01-02
15:04:05.99999"), u.Sex,
+ u.ID, u.Name, u.Age, time.Unix(int64(u.Time),
0).Format("2006-01-02 15:04:05.99999"), u.Sex,
)
}
type UserProvider struct {
GetUsers func(req []interface{}) ([]JsonRPCUser, error)
- GetUser func(ctx context.Context, req []interface{}, rsp *JsonRPCUser)
error
+ GetUser func(ctx context.Context, req []interface{}) (JsonRPCUser,
error)
GetUser0 func(id string, name string) (JsonRPCUser, error)
- GetUser1 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser)
error
- GetUser2 func(ctx context.Context, req []interface{}, rsp *JsonRPCUser)
error `dubbo:"getUser"`
+ GetUser1 func(ctx context.Context, req []interface{}) (JsonRPCUser,
error)
+ GetUser2 func(ctx context.Context, req []interface{}) (JsonRPCUser,
error) `dubbo:"getUser"`
Review comment:
有问题可以找我
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]