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

@@ -3,10 +3,12 @@ package global
import "flag"
var Flags struct {
Path string
Path string
Daemon bool
}
func initFlags() {
flag.StringVar(&Flags.Path, "config", "", "config path")
flag.BoolVar(&Flags.Daemon, "daemon", false, "")
flag.Parse()
}