@ -28,7 +28,7 @@ func UserRegister(c *gin.Context) {
return
}
req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}}
utils.CopyStructFields(*req.UserInfo, params)
utils.CopyStructFields(req.UserInfo, ¶ms)
//copier.Copy(req.UserInfo, ¶ms)
req.OperationID = params.OperationID
log.NewInfo(req.OperationID, "UserRegister args ", req.String())
@ -8,7 +8,7 @@ import (
// copy a by b b->a
func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) {
return copier.Copy(&a, &b)
return copier.Copy(a, b)
at := reflect.TypeOf(a)
av := reflect.ValueOf(a)