style: 变量命名

This commit is contained in:
Mmx233
2023-08-28 22:49:17 +08:00
parent 1df6000c71
commit e77448eeb9
10 changed files with 130 additions and 130 deletions

View File

@@ -21,18 +21,18 @@ func Guardian() {
_ = recover()
}()
if config.Settings.Basic.Interfaces == "" { //单网卡
e := Login(nil, true)
if e != nil {
log.Errorln("登录出错: ", e)
err := Login(nil, true)
if err != nil {
log.Errorln("登录出错: ", err)
}
} else { //多网卡
interfaces, e := tools.GetInterfaceAddr(config.Settings.Basic.Interfaces)
if e == nil {
interfaces, err := tools.GetInterfaceAddr(config.Settings.Basic.Interfaces)
if err == nil {
for _, eth := range interfaces {
log.Debugf("使用 %s 网口登录 ", eth.Name)
e = Login(&eth, true)
if e != nil {
log.Errorln("网口 ", eth.Name+" 登录出错: ", e)
err = Login(&eth, true)
if err != nil {
log.Errorln("网口 ", eth.Name+" 登录出错: ", err)
}
}
}

View File

@@ -50,9 +50,9 @@ func Login(eth *tools.Eth, debugOutput bool) error {
output("正在获取登录状态")
online, ip, e := srunClient.LoginStatus()
if e != nil {
return e
online, ip, err := srunClient.LoginStatus()
if err != nil {
return err
}
log.Debugln("认证客户端 ip: ", ip)
@@ -72,8 +72,8 @@ func Login(eth *tools.Eth, debugOutput bool) error {
} else {
log.Infoln("检测到用户未登录,开始尝试登录...")
if e = srunClient.DoLogin(ip); e != nil {
return e
if err = srunClient.DoLogin(ip); err != nil {
return err
}
log.Infoln("登录成功~")