You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
580 B
Go

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