summaryrefslogtreecommitdiff
path: root/internal/cache/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cache/cache.go')
-rw-r--r--internal/cache/cache.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/cache/cache.go b/internal/cache/cache.go
index 4d6b45c..b650ba1 100644
--- a/internal/cache/cache.go
+++ b/internal/cache/cache.go
@@ -8,7 +8,7 @@ import (
)
type Entry struct {
- Msg *dns.Msg
+ Msg *dns.Msg
Expires time.Time
}
@@ -17,7 +17,7 @@ func (e *Entry) expired() bool {
}
type Cache struct {
- mu sync.RWMutex
+ mu sync.RWMutex
data map[string]*Entry
}
@@ -67,7 +67,7 @@ func (c *Cache) Set(qname dns.Name, qtype, qclass uint16, msg *dns.Msg, ttl uint
key := makeKey(qname, qtype, qclass)
c.mu.Lock()
c.data[key] = &Entry{
- Msg: msg,
+ Msg: msg,
Expires: time.Now().Add(time.Duration(ttl) * time.Second),
}
c.mu.Unlock()