更新工作区配置,删除不再使用的Cloudflare相关文件,优化日志输出格式,增强主机信息收集功能,调整代码结构以提高可维护性。
This commit is contained in:
@@ -110,6 +110,12 @@ func (c *CloudflareClient) ListDNSRecords(zoneID string, filter *DNSRecordFilter
|
||||
return nil, fmt.Errorf("failed to unmarshal DNS records: %w", err)
|
||||
}
|
||||
|
||||
// 将域名和ID的映射关系存储到dnsNameToIDMap中
|
||||
c.dnsNameToIDMap = make(map[string]string, len(records))
|
||||
for _, record := range records {
|
||||
c.dnsNameToIDMap[record.Name] = record.ID
|
||||
}
|
||||
|
||||
log.Info("Successfully retrieved %d DNS records for zone ID: %s", len(records), zoneID)
|
||||
return records, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user