mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-20 08:53:49 +08:00
代码规范过滤,移除冗余代码,替换掉不推荐的包
This commit is contained in:
@@ -93,7 +93,7 @@ func (s *sAuthClient) IsLogin() bool {
|
||||
func (s *sAuthClient) onLoginEvent() {
|
||||
|
||||
// 获取授权数据
|
||||
s.client.Send(s.client.Ctx, &msgin.AuthSummary{})
|
||||
_ = s.client.Send(s.client.Ctx, &msgin.AuthSummary{})
|
||||
}
|
||||
|
||||
// onCloseEvent 连接关闭回调事件
|
||||
|
@@ -10,12 +10,12 @@ import (
|
||||
func (s *sAuthClient) OnResponseAuthSummary(ctx context.Context, args ...interface{}) {
|
||||
var in *msgin.ResponseAuthSummary
|
||||
if err := gconv.Scan(args[0], &in); err != nil {
|
||||
s.client.Logger.Warningf(ctx, "OnResponseAuthSummary Scan err:+v", err)
|
||||
s.client.Logger.Warningf(ctx, "OnResponseAuthSummary Scan err:%+v", err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := in.GetError(); err != nil {
|
||||
s.client.Logger.Warningf(ctx, "OnResponseAuthSummary GetError :+v", err)
|
||||
s.client.Logger.Warningf(ctx, "OnResponseAuthSummary GetError:%+v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ func (s *sCronClient) OnCronDelete(ctx context.Context, args ...interface{}) {
|
||||
if err := gconv.Scan(args[0], &in); err != nil {
|
||||
res.Code = 1
|
||||
res.Message = err.Error()
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func (s *sCronClient) OnCronDelete(ctx context.Context, args ...interface{}) {
|
||||
res.Message = err.Error()
|
||||
}
|
||||
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
}
|
||||
|
||||
// OnCronEdit 编辑任务
|
||||
@@ -39,7 +39,7 @@ func (s *sCronClient) OnCronEdit(ctx context.Context, args ...interface{}) {
|
||||
if err := gconv.Scan(args[0], &in); err != nil {
|
||||
res.Code = 1
|
||||
res.Message = err.Error()
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func (s *sCronClient) OnCronEdit(ctx context.Context, args ...interface{}) {
|
||||
res.Message = err.Error()
|
||||
}
|
||||
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
}
|
||||
|
||||
// OnCronStatus 修改任务状态
|
||||
@@ -61,7 +61,7 @@ func (s *sCronClient) OnCronStatus(ctx context.Context, args ...interface{}) {
|
||||
if err := gconv.Scan(args[0], &in); err != nil {
|
||||
res.Code = 1
|
||||
res.Message = err.Error()
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ func (s *sCronClient) OnCronStatus(ctx context.Context, args ...interface{}) {
|
||||
res.Message = err.Error()
|
||||
}
|
||||
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
}
|
||||
|
||||
// OnCronOnlineExec 执行一次任务
|
||||
@@ -83,7 +83,7 @@ func (s *sCronClient) OnCronOnlineExec(ctx context.Context, args ...interface{})
|
||||
if err := gconv.Scan(args[0], &in); err != nil {
|
||||
res.Code = 1
|
||||
res.Message = err.Error()
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -92,5 +92,5 @@ func (s *sCronClient) OnCronOnlineExec(ctx context.Context, args ...interface{})
|
||||
res.Message = err.Error()
|
||||
}
|
||||
|
||||
s.client.Reply(ctx, res)
|
||||
_ = s.client.Reply(ctx, res)
|
||||
}
|
||||
|
Reference in New Issue
Block a user