mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-17 16:02:28 +08:00
简化配置表读取
This commit is contained in:
8
cmd/anticheat/application.toml
Normal file
8
cmd/anticheat/application.toml
Normal 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
28
cmd/anticheat/main.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user