From 62d0a7e6ffd149c6646bab74c6f8474a04002a9d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:15:51 +0800 Subject: [PATCH] tidy code --- internal/api/auth/auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 2b3420d90..8881e27b1 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -7,9 +7,9 @@ import ( "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" + "github.com/jinzhu/copier" "net/http" "strings" ) @@ -28,8 +28,8 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} - utils.CopyStructFields(*req.UserInfo, params) - // copier.Copy(req.UserInfo, ¶ms) + // utils.CopyStructFields(*req.UserInfo, params) + copier.Copy(req.UserInfo, ¶ms) 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)