mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
@@ -224,6 +224,16 @@ func (dc *DomainConfig) HasRecordTypeName(rtype, name string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (dc *DomainConfig) Filter(f func(r *RecordConfig) bool) {
|
||||
recs := []*RecordConfig{}
|
||||
for _, r := range dc.Records {
|
||||
if f(r) {
|
||||
recs = append(recs, r)
|
||||
}
|
||||
}
|
||||
dc.Records = recs
|
||||
}
|
||||
|
||||
func InterfaceToIP(i interface{}) (net.IP, error) {
|
||||
switch v := i.(type) {
|
||||
case float64:
|
||||
|
Reference in New Issue
Block a user