Enhance Network Interface Detection and Configuration Management
- Implemented robust network interface detection with `GetInterfaces()` function - Added validation for network interface names using regex patterns - Updated `Network` struct to improve YAML tag formatting - Modified `Gather()` and `SaveConfig()` methods to streamline network configuration - Removed redundant `SaveConfig()` calls in various methods - Added comprehensive network interface name validation logic
This commit is contained in:
@@ -25,6 +25,7 @@ func addZshSubcommands(cmd *cobra.Command) {
|
||||
if config.ConfigCache.Agent.Network.Public.IPv4 == "" {
|
||||
network := config.ConfigCache.Agent.Network
|
||||
network.Gather()
|
||||
network.SaveConfig()
|
||||
}
|
||||
|
||||
// 下载并安装zsh和git
|
||||
|
||||
Reference in New Issue
Block a user