Misspell correction (#826)

Did a `misspell . | grep -v ^vendor` and fixed
several typos.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2017-08-04 09:06:06 -07:00
committed by Miek Gieben
parent 21386ebdd5
commit c08497adee
9 changed files with 9 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ import (
"time"
)
// Freq tracks the frequence of things.
// Freq tracks the frequencies of things.
type Freq struct {
// Last time we saw a query for this element.
last time.Time

View File

@@ -43,7 +43,7 @@ func (c *Cache) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
if c.prefetch > 0 && i.Freq.Hits() > c.prefetch && pct < c.percentage {
// When prefetching we loose the item i, and with it the frequency
// that we've gathered sofar. See we copy the frequence info back
// that we've gathered sofar. See we copy the frequencies info back
// into the new item that was stored in the cache.
prr := &ResponseWriter{ResponseWriter: w, Cache: c, prefetch: true}
middleware.NextOrFailure(c.Name(), c.Next, ctx, prr, r)

View File

@@ -26,7 +26,7 @@ type ResponseWriter struct {
err error
}
// Check if a dnstap error occured.
// Check if a dnstap error occurred.
// Set during ResponseWriter.Write.
func (w ResponseWriter) DnstapError() error {
return w.err

View File

@@ -39,7 +39,7 @@ func (z *Zone) Lookup(state request.Request, qname string) ([]dns.RR, []dns.RR,
}
}()
// If z is a secondary zone we might not have transfered it, meaning we have
// If z is a secondary zone we might not have transferred it, meaning we have
// all zone context setup, except the actual record. This means (for one thing) the apex
// is empty and we don't have a SOA record.
soa := z.Apex.SOA

View File

@@ -6,7 +6,7 @@ import "github.com/miekg/dns"
// * reverts question section of a packet to its original state.
// This is done to avoid the 'Question section mismatch:' error in client.
// * Defers write to the client if the response code is NXDOMAIN. This is needed
// to enable further search path probing if a search was not sucessful.
// to enable further search path probing if a search was not successful.
// * Allow forced write to client regardless of response code. This is needed to
// write the packet to the client if the final search in the path fails to
// produce results.

View File

@@ -71,7 +71,7 @@ func TestIsNameError(t *testing.T) {
if !k.IsNameError(errInvalidRequest) {
t.Errorf("Expected 'true' for '%v'", errInvalidRequest)
}
otherErr := errors.New("Some other error occured")
otherErr := errors.New("Some other error occurred")
if k.IsNameError(otherErr) {
t.Errorf("Expected 'true' for '%v'", otherErr)
}