MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / byPurpose

Function byPurpose

internal/httpapi/domainview_test.go:11–17  ·  view source on GitHub ↗

byPurpose indexes a domainView's unified DNS-records array by purpose so the assertions can address records by what they're for rather than by position.

(recs []DNSRecord)

Source from the content-addressed store, hash-verified

9// byPurpose indexes a domainView's unified DNS-records array by purpose so the
10// assertions can address records by what they're for rather than by position.
11func byPurpose(recs []DNSRecord) map[string]DNSRecord {
12 m := make(map[string]DNSRecord, len(recs))
13 for _, r := range recs {
14 m[r.Purpose] = r
15 }
16 return m
17}
18
19// TestDomainViewInboundStatus: inbound records (ownership, inbound_mx) follow
20// `verified`; with the sending feature off there are no mail_from records and

Callers 3

Calls 1

makeFunction · 0.85

Tested by

no test coverage detected