diff options
Diffstat (limited to 'plugin/file/zone.go')
-rw-r--r-- | plugin/file/zone.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/file/zone.go b/plugin/file/zone.go index 1cef9dc3a..540c65f0b 100644 --- a/plugin/file/zone.go +++ b/plugin/file/zone.go @@ -67,6 +67,16 @@ func (z *Zone) Copy() *Zone { return z1 } +// CopyWithoutApex copies zone z without the Apex records. +func (z *Zone) CopyWithoutApex() *Zone { + z1 := NewZone(z.origin, z.file) + z1.TransferTo = z.TransferTo + z1.TransferFrom = z.TransferFrom + z1.Expired = z.Expired + + return z1 +} + // Insert inserts r into z. func (z *Zone) Insert(r dns.RR) error { r.Header().Name = strings.ToLower(r.Header().Name) |