删除多个不再使用的配置文件和脚本,更新工作区配置,优化构建和上传脚本,增强项目结构的清晰度和可维护性。
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"agent-wdd/config"
|
||||
"agent-wdd/log"
|
||||
"agent-wdd/utils"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"agent-wdd/host_info"
|
||||
"agent-wdd/log"
|
||||
"agent-wdd/utils"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func addConfigSubcommands(cmd *cobra.Command) {
|
||||
|
||||
showConfigCmd := &cobra.Command{
|
||||
Use: "show",
|
||||
Short: "显示agent运行配置",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
log.Info("显示agent运行配置")
|
||||
|
||||
content := utils.ReadAllContentFromFile(config.WddConfigFilePath)
|
||||
|
||||
utils.BeautifulPrintListWithTitle(content, "agent运行配置")
|
||||
|
||||
log.Info("显示agent运行配置完成")
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
cmd.AddCommand(showConfigCmd)
|
||||
|
||||
|
||||
showConfigCmd := &cobra.Command{
|
||||
Use: "show",
|
||||
Short: "显示agent运行配置",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
log.Info("显示agent运行配置")
|
||||
|
||||
content := utils.ReadAllContentFromFile(host_info.WddConfigFilePath)
|
||||
|
||||
utils.BeautifulPrintListWithTitle(content, "agent运行配置")
|
||||
|
||||
log.Info("显示agent运行配置完成")
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
cmd.AddCommand(showConfigCmd)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user