fix: 统一flag处理

This commit is contained in:
Mmx
2021-11-25 08:03:17 +08:00
parent 9ddc4950bf
commit 1509e5f848
2 changed files with 5 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
package controllers
import (
"flag"
"fmt"
"github.com/Mmx233/BitSrunLoginGo/global"
"github.com/Mmx233/tool"
"time"
)
@@ -18,9 +18,7 @@ var Daemon = daemon{
}
func init() {
goDaemon := flag.Bool("daemon", false, "")
flag.Parse()
if *goDaemon {
if global.Flags.Daemon {
Guardian(false)
}
}