简化配置表读取

This commit is contained in:
flswld
2023-03-16 16:26:14 +08:00
parent 2a3ce25898
commit 5e5492943d
51 changed files with 418 additions and 2560 deletions

View File

@@ -0,0 +1,8 @@
[logger]
level = "DEBUG"
mode = "CONSOLE"
track = true
max_size = 10485760
[mq]
nats_url = "nats://nats:4222"

28
cmd/anticheat/main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"context"
"flag"
"fmt"
_ "net/http/pprof"
"os"
"hk4e/anticheat/app"
"hk4e/pkg/statsviz_serve"
)
var (
config = flag.String("config", "application.toml", "config file")
)
func main() {
flag.Parse()
go func() {
_ = statsviz_serve.Serve("0.0.0.0:5678")
}()
err := app.Run(context.TODO(), *config)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}