Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "exec [flags]", Short: "执行命令指令集", Example: "\neasyctl exec 'date' -c config.yaml", Run: func(cmd *cobra.Command, args []string) { if len(args) != 0 { shell := args[0] command.DefaultLogger.Infof("执行: %s", shell) b, err := os.ReadFile(configFile) if err != nil { logrus.Infof("未找到配置文件,为您生成配置文件样例, 请修改文件内容后携带 -c 参数重新执行 -> %s", constant.ConfigFile) _ = os.WriteFile(constant.ConfigFile, execConfig, 0666) os.Exit(-1) } runner.RemoteRun(runner.RemoteRunItem{ ManifestContent: b, Logger: command.DefaultLogger, Cmd: shell, RecordErrServerList: true, }) } }, }
RootCmd close命令
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.