mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-10 00:22:28 +08:00
24 lines
387 B
Go
24 lines
387 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
"hk4e/gm/app"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// GMCmd
|
|
func GMCmd() *cobra.Command {
|
|
var cfg string
|
|
c := &cobra.Command{
|
|
Use: "gm",
|
|
Short: "gm 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
|
|
}
|