mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-25 06:29:19 +08:00
tidy code
This commit is contained in:
parent
2293253d52
commit
6f92fa0069
@ -27,7 +27,7 @@ func UserRegister(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
req := &rpc.UserRegisterReq{}
|
||||
utils.CopyStructFields(req.UserInfo, params)
|
||||
utils.CopyStructFields(*req.UserInfo, params)
|
||||
req.OperationID = params.OperationID
|
||||
log.NewInfo(req.OperationID, "UserRegister args ", req.String())
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName)
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
|
||||
// copy a by b b->a
|
||||
func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) {
|
||||
copier.Copy(a, &b)
|
||||
copier.Copy(&a, &b)
|
||||
at := reflect.TypeOf(a)
|
||||
av := reflect.ValueOf(a)
|
||||
bt := reflect.TypeOf(b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user