You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/01 00:39:24 UTC

[GitHub] [dubbo-go-samples] LaurenceLiZhixin commented on a change in pull request #214: Ftr/jsonrpc using dubbogo config

LaurenceLiZhixin commented on a change in pull request #214:
URL: https://github.com/apache/dubbo-go-samples/pull/214#discussion_r699762361



##########
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:
       把[]interface{}参数都改成具体的类型




-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org