配置读取功能实现,核心功能未实现

This commit is contained in:
2022-09-10 08:50:11 +08:00
commit 1f6da5fd8d
19 changed files with 425 additions and 0 deletions

26
pkg/boot/bootstrap.go Normal file
View File

@@ -0,0 +1,26 @@
package boot
import (
"NaiveBotRouter/pkg/conf"
"NaiveBotRouter/pkg/log"
ws "NaiveBotRouter/pkg/websocket"
"flag"
)
var (
cfgFile string
debug bool
)
func init() {
flag.StringVar(&cfgFile, "config", "config.toml", "config file")
flag.BoolVar(&debug, "debug", false, "debug mode")
flag.Parse()
log.InitLog(debug)
}
func Bootstrap() {
conf.InitConfig(cfgFile)
ws.ServeBackendServer()
}