docs(README): 更新安装后端依赖说明
- 添加安装 Wails 最新版本的命令 - 更新 package.json.md5 校验值
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"equipment-analyzer/internal/model"
|
||||
"fmt"
|
||||
"github.com/google/gopacket/pcap"
|
||||
"log"
|
||||
)
|
||||
|
||||
// GetNetworkInterfaces 获取网络接口列表
|
||||
@@ -13,6 +14,8 @@ func GetNetworkInterfaces() ([]model.NetworkInterface, error) {
|
||||
return nil, fmt.Errorf("failed to find network devices: %v", err)
|
||||
}
|
||||
|
||||
log.Printf("抓取到的网卡设备数量: %d", len(devices)) // 打印网卡总数
|
||||
|
||||
var interfaces []model.NetworkInterface
|
||||
for _, device := range devices {
|
||||
// 跳过回环接口
|
||||
@@ -20,6 +23,8 @@ func GetNetworkInterfaces() ([]model.NetworkInterface, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Printf("网卡名称: %s, 描述: %s", device.Name, device.Description) // 打印每个网卡的名称和描述
|
||||
|
||||
// 提取IP地址
|
||||
var addresses []string
|
||||
for _, address := range device.Addresses {
|
||||
|
||||
Reference in New Issue
Block a user