1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

SPF Flatten for non apex domains (#1220)

This commit is contained in:
Vincent Hagen
2021-07-25 17:53:31 +02:00
committed by GitHub
parent f63302b978
commit 243762d171
2 changed files with 12 additions and 2 deletions

View File

@@ -452,6 +452,16 @@ func (recs Records) FQDNMap() (m map[string]bool) {
return m
}
func (recs Records) GetByType(typeName string) Records {
results := Records{}
for _, rec := range recs {
if rec.Type == typeName {
results = append(results, rec)
}
}
return results
}
// GroupedByKey returns a map of keys to records.
func (recs Records) GroupedByKey() map[RecordKey]Records {
groups := map[RecordKey]Records{}