配置读取功能实现,核心功能未实现
This commit is contained in:
26
pkg/boot/bootstrap.go
Normal file
26
pkg/boot/bootstrap.go
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user