style:修正变量名
This commit is contained in:
@@ -26,7 +26,7 @@ func Guardian(output bool) {
|
|||||||
|
|
||||||
func EnterGuardian() {
|
func EnterGuardian() {
|
||||||
if global.Config.Settings.Guardian != 0 {
|
if global.Config.Settings.Guardian != 0 {
|
||||||
global.Status.Daemon = true
|
global.Status.Guardian = true
|
||||||
util.Log.Println("[Guardian mode]")
|
util.Log.Println("[Guardian mode]")
|
||||||
if global.Config.Settings.Daemon {
|
if global.Config.Settings.Daemon {
|
||||||
if err := exec.Command(os.Args[0], "-daemon").Start(); err != nil {
|
if err := exec.Command(os.Args[0], "-daemon").Start(); err != nil {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ func Login(output bool) error {
|
|||||||
util.Log.Println("Step0: 检查状态…")
|
util.Log.Println("Step0: 检查状态…")
|
||||||
G := global.Config.Generate()
|
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("网络正常,程序退出")
|
util.Log.Println("网络正常,程序退出")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ import "autoLogin/modles"
|
|||||||
var Config *modles.Config
|
var Config *modles.Config
|
||||||
|
|
||||||
var Status struct {
|
var Status struct {
|
||||||
Output bool
|
Output bool
|
||||||
Daemon bool
|
Guardian bool
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user