拆分战斗服务器

This commit is contained in:
huangxiaolei committed 2022-12-19 22:11:55 +08:00
1 parent cf4804c444
commit 0dc45708d6
21 files changed
+793 -349

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package main
import (
"context"
"hk4e/fight/app"
"github.com/spf13/cobra"
)
// FightCmd 检查配表命令
func FightCmd() *cobra.Command {
var cfg string
c := &cobra.Command{
Use: "fight",
Short: "fight server",
RunE: func(cmd *cobra.Command, args []string) error {
return app.Run(context.Background(), cfg)
},
}
c.Flags().StringVar(&cfg, "config", "application.toml", "config file")
return c
}