style:修正变量名

This commit is contained in:
Mmx
2021-07-11 13:18:59 +08:00
parent 69d4b9f422
commit 17748b88a0
3 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ func Guardian(output bool) {
func EnterGuardian() {
if global.Config.Settings.Guardian != 0 {
global.Status.Daemon = true
global.Status.Guardian = true
util.Log.Println("[Guardian mode]")
if global.Config.Settings.Daemon {
if err := exec.Command(os.Args[0], "-daemon").Start(); err != nil {

View File

@@ -15,7 +15,7 @@ func Login(output bool) error {
util.Log.Println("Step0: 检查状态…")
G := global.Config.Generate()
if !global.Status.Daemon && global.Config.Settings.QuitIfNetOk && util.Checker.NetOk() {
if !global.Status.Guardian && global.Config.Settings.QuitIfNetOk && util.Checker.NetOk() {
util.Log.Println("网络正常,程序退出")
return nil
}

View File

@@ -5,6 +5,6 @@ import "autoLogin/modles"
var Config *modles.Config
var Status struct {
Output bool
Daemon bool
Output bool
Guardian bool
}