新增单进程模式

This commit is contained in:
flswld committed 2024-07-18 00:56:30 +08:00
1 parent 669a524153
commit 6136e57919
73 files changed
+1900 -153

No files matched your search

+4 -1
View File
@@ -1,6 +1,8 @@
package main
import (
cfg "hk4e/common/config"
"github.com/spf13/cobra"
"context"
@@ -15,7 +17,8 @@ func RobotCmd() *cobra.Command {
Use: "robot",
Short: "robot server",
RunE: func(cmd *cobra.Command, args []string) error {
return app.Run(context.Background(), configFile)
cfg.InitConfig(configFile)
return app.Run(context.Background())
},
}
c.Flags().StringVar(&configFile, "config", "application.toml", "config file")