mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
tidy code
This commit is contained in:
parent
848510d4ca
commit
ec95f0a7af
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user