Files
ProjectOctopus/agent-wdd/cmd/Config.go
zeaslity 72bc56b5e5 Enhance Zsh and Config Commands, Update Network Configuration
- Implemented comprehensive Zsh installation command with multiple network scenarios
- Added 'config show' subcommand to display agent configuration
- Updated version command to print version information
- Modified Network configuration to clarify internet connectivity status
- Improved download utility with additional file existence checks
- Updated agent-wdd rules and documentation
2025-02-27 14:20:05 +08:00

31 lines
560 B
Go

package cmd
import (
"agent-wdd/config"
"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)
}