diff --git a/modules/user/module.go b/modules/user/module.go index 86718f344..4c69025cf 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -246,7 +246,7 @@ func (this *User) CrossUserSession(uid string) *pb.CacheUser { // 跨服创建玩家公会 date 3.10 func (this *User) CrossCreateSociaty(uid, sociatyName string) *pb.DBSociaty { - sociaty:= &pb.DBSociaty{} + sociaty := &pb.DBSociaty{} this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), comm.Service_Worker, Rpc_CreateSociaty, &pb.RPCGeneralReqA2{Param1: uid, Param2: sociatyName}, sociaty) return sociaty @@ -260,7 +260,7 @@ func (this *User) RpcCreateSociaty(ctx context.Context, req *pb.RPCGeneralReqA2, } model := db.NewDBModel(comm.TableSociaty, 0, conn) - sociaty:= &pb.DBSociaty{} + sociaty := &pb.DBSociaty{} _id := primitive.NewObjectID().Hex() sociaty.Creater = req.Param1 sociaty.Name = req.Param2 @@ -603,7 +603,7 @@ func (this *User) ChangeUserExpand(uid string, value map[string]interface{}) err func (this *User) getUserFromRemoteDb(uid string, rsp *pb.DBUser) error { sid, _, ok := utils.UIdSplit(uid) if !ok { - return errors.New("sid split error") + return fmt.Errorf("sid split err,uid: %v", uid) } conn, err := db.ServerDBConn(sid) if err != nil {