From 00ddf6551ce385235950460c4ce39fcc379017b1 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sun, 15 Jul 2012 20:23:53 +0200 Subject: [PATCH 1/2] use official one --- zone.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone.go b/zone.go index ed9d07d0..38c8f6e7 100644 --- a/zone.go +++ b/zone.go @@ -3,7 +3,7 @@ package dns // A structure for handling zone data import ( - "github.com/miekg/radix" + "github.com/sauerbraten/radix" ) type Zone struct { From 6e31effe788dfaa270d43a8828663aca124c27c7 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sun, 15 Jul 2012 23:15:04 +0200 Subject: [PATCH 2/2] More zone updates --- zone.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zone.go b/zone.go index 38c8f6e7..24bcbb76 100644 --- a/zone.go +++ b/zone.go @@ -6,11 +6,16 @@ import ( "github.com/sauerbraten/radix" ) +// Zone represents a DNS zone. type Zone struct { Name string // Name of the zone *radix.Radix // Zone data + + // soa parameters in here TODO(mg) } +// ZoneData holds all the RR belonging to Name. +// TODO(mg): uitbreiden type ZoneData struct { Name string // Domain name for this node RR map[uint16][]RR // Map of the RR type to the RR @@ -26,6 +31,7 @@ func NewZone(name string) *Zone { return z } +// Insert inserts an RR into the zone. Overwrites. func (z *Zone) Insert(r RR) { zd := z.Radix.Find(r.Header().Name) if zd == nil {