package main import ( "flag" "git.noahlan.cn/northlan/ntools-go/logger" "live-gateway/bilibili" "live-gateway/config" "sync" ) var configFile = flag.String("f", "./config.yml", "the config file") func main() { flag.Parse() config.Init(*configFile) _ = logger.InitLogger(&config.Config.Log.File, &config.Config.Log.Console) defer logger.Sync() var wg sync.WaitGroup bLive := bilibili.NewLiveBilibili() wg.Add(1) go func() { if err := bLive.Serve(); err != nil { wg.Done() panic(err) } }() wg.Wait() }