This commit is contained in:
lu.bai committed 2022-11-24 23:29:33 +08:00
1 parent 71d0135d6f
commit 48d5291b33
18 files changed
+445 -191

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package main
import (
"context"
"hk4e/dispatch/app"
"github.com/spf13/cobra"
)
// DispatchCmd
func DispatchCmd() *cobra.Command {
var cfg string
c := &cobra.Command{
Use: "dispatch",
Short: "dispatch 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
}