style: 变量命名
This commit is contained in:
@@ -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(ð, true)
|
||||
if e != nil {
|
||||
log.Errorln("网口 ", eth.Name+" 登录出错: ", e)
|
||||
err = Login(ð, true)
|
||||
if err != nil {
|
||||
log.Errorln("网口 ", eth.Name+" 登录出错: ", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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("登录成功~")
|
||||
|
||||
Reference in New Issue
Block a user