Files
hk4e/cmd/hk4e/main.go
2023-02-05 07:53:20 +08:00

37 lines
496 B
Go

package main
import (
"flag"
"fmt"
_ "net/http/pprof"
"os"
"github.com/spf13/cobra"
)
var (
config = flag.String("config", "application.toml", "config file")
)
func main() {
rootCmd := &cobra.Command{
Use: "hk4e",
Short: "hk4e server",
SilenceUsage: true,
}
rootCmd.AddCommand(
NodeCmd(),
DispatchCmd(),
GateCmd(),
FightCmd(),
PathfindingCmd(),
GSCmd(),
GMCmd(),
)
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}