This commit is contained in:
cdle
2021-09-17 07:10:14 +08:00
parent d7be38dcf4
commit 57611764ae
4 changed files with 19 additions and 14 deletions
-12
View File
@@ -21,18 +21,6 @@ var ExecPath, _ = filepath.Abs(filepath.Dir(os.Args[0]))
var Config Yaml
func init() {
killp()
for _, arg := range os.Args {
if arg == "-d" {
Daemon()
}
}
ReadYaml(ExecPath+"/conf/", &Config, "https://raw.githubusercontent.com/cdle/sillyGirl/main/conf/demo_config.yaml")
InitReplies()
initToHandleMessage()
}
func ReadYaml(confDir string, conf interface{}, url string) {
path := confDir + "config.yaml"
if _, err := os.Stat(confDir); err != nil {