chore: 修正 main 包导入别名
This commit is contained in:
@@ -2,26 +2,26 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
controllers2 "github.com/Mmx233/BitSrunLoginGo/internal/controllers"
|
||||
global2 "github.com/Mmx233/BitSrunLoginGo/internal/global"
|
||||
"github.com/Mmx233/BitSrunLoginGo/internal/controllers"
|
||||
"github.com/Mmx233/BitSrunLoginGo/internal/global"
|
||||
"github.com/Mmx233/BitSrunLoginGo/tools"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if global2.Flags.RunningDaemon {
|
||||
if global.Flags.RunningDaemon {
|
||||
//后台挂起模式中
|
||||
controllers2.Guardian()
|
||||
} else if global2.Config.Settings.Guardian.Enable {
|
||||
controllers.Guardian()
|
||||
} else if global.Config.Settings.Guardian.Enable {
|
||||
//进入守护模式流程
|
||||
controllers2.EnterGuardian()
|
||||
controllers.EnterGuardian()
|
||||
} else {
|
||||
//登录流程
|
||||
var err error
|
||||
if global2.Config.Settings.Basic.Interfaces == "" { //单网卡
|
||||
if err = controllers2.Login(nil, false); err != nil {
|
||||
if global.Config.Settings.Basic.Interfaces == "" { //单网卡
|
||||
if err = controllers.Login(nil, false); err != nil {
|
||||
log.Errorln("登录出错: ", err)
|
||||
if !global2.Config.Settings.Log.DebugLevel {
|
||||
if !global.Config.Settings.Log.DebugLevel {
|
||||
fmt.Printf("开启调试日志(debug_level)获取详细信息")
|
||||
}
|
||||
return
|
||||
@@ -31,7 +31,7 @@ func main() {
|
||||
interfaces, _ := tools.GetInterfaceAddr()
|
||||
for _, eth := range interfaces {
|
||||
log.Infoln("使用网卡: ", eth.Name)
|
||||
if err = controllers2.Login(eth.Addr, false); err != nil {
|
||||
if err = controllers.Login(eth.Addr, false); err != nil {
|
||||
log.Errorf("网卡 %s 登录出错: %v", eth.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user