删除多个不再使用的配置文件和脚本,更新工作区配置,优化构建和上传脚本,增强项目结构的清晰度和可维护性。

This commit is contained in:
zeaslity
2025-03-27 23:26:39 +08:00
parent 7dabce3fa5
commit c2ca7eb6d7
25 changed files with 157 additions and 1414 deletions

View File

@@ -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)
}