1
0

Fix: 统一日志术语并清理重复注释

- database -> storage
- 移除重复的Neighbor注释
Bu işleme şunda yer alıyor:
Your Name
2026-04-26 01:24:00 +08:00
ebeveyn 096e752459
işleme a2505cfe44
2 değiştirilmiş dosya ile 2 ekleme ve 3 silme
+1 -1
Dosyayı Görüntüle
@@ -50,7 +50,7 @@ func NewApp(cfg *config.Config) *App {
if err != nil { if err != nil {
log.Printf("Warning: failed to load devices from database: %v", err) log.Printf("Warning: failed to load devices from database: %v", err)
} else { } else {
log.Printf("Loaded %d devices from database", len(devices)) log.Printf("Loaded %d devices from storage", len(devices))
for _, dev := range devices { for _, dev := range devices {
app.builder.AddDevice(dev) app.builder.AddDevice(dev)
} }
+1 -2
Dosyayı Görüntüle
@@ -47,13 +47,12 @@ type Interface struct {
OutPackets int64 `json:"out_packets"` OutPackets int64 `json:"out_packets"`
} }
// Neighbor 邻居设备信息
// Neighbor 邻居设备信息 // Neighbor 邻居设备信息
type Neighbor struct { type Neighbor struct {
LocalInterface string `json:"local_interface"` LocalInterface string `json:"local_interface"`
RemoteDevice string `json:"remote_device"` RemoteDevice string `json:"remote_device"`
RemoteIP string `json:"remote_ip"` RemoteIP string `json:"remote_ip"`
RemoteMAC string `json:"remote_mac,omitempty"` // 新增:邻居MAC地址 RemoteMAC string `json:"remote_mac,omitempty"` // MAC地址(用于拓扑匹配)
RemoteInterface string `json:"remote_interface"` RemoteInterface string `json:"remote_interface"`
Protocol string `json:"protocol"` // CDP, LLDP, ARP Protocol string `json:"protocol"` // CDP, LLDP, ARP
} }