diff --git a/plugin/errors/errors.go b/plugin/errors/errors.go index aa4b384b8..168092097 100644 --- a/plugin/errors/errors.go +++ b/plugin/errors/errors.go @@ -50,7 +50,7 @@ func errorLogger(code int, qName, qType, err string) { } func consLogger(cnt uint32, pattern string, p time.Duration) { - log.Errorf("%d errors like '%s' occured in last %s", cnt, pattern, p) + log.Errorf("%d errors like '%s' occurred in last %s", cnt, pattern, p) } func (h *errorHandler) logPattern(i int) { diff --git a/plugin/errors/errors_test.go b/plugin/errors/errors_test.go index 9265d3fc2..704c132ed 100644 --- a/plugin/errors/errors_test.go +++ b/plugin/errors/errors_test.go @@ -78,7 +78,7 @@ func TestConsLogger(t *testing.T) { consLogger(5, "^Error.*!$", 3*time.Second) - exp := "[ERROR] plugin/errors: 5 errors like '^Error.*!$' occured in last 3s" + exp := "[ERROR] plugin/errors: 5 errors like '^Error.*!$' occurred in last 3s" act := buf.String() if !strings.Contains(act, exp) { t.Errorf("Unexpected log message, expected to contain %q, actual %q", exp, act) diff --git a/request/request.go b/request/request.go index 6134fc99d..f9dddda93 100644 --- a/request/request.go +++ b/request/request.go @@ -299,8 +299,8 @@ func (r *Request) Scrub(reply *dns.Msg) *dns.Msg { // pretty rare. Normally, the loop will exit when l > re, meaning that // in the previous iteration either: // rl < size: no need to do anything. - // rl > size: the final size is too large, and if m > 0, the preceeding - // iteration the size was too small. Select that preceeding size. + // rl > size: the final size is too large, and if m > 0, the preceding + // iteration the size was too small. Select that preceding size. if rl > size && m > 0 { reply.Extra = origExtra[:m-1] rl = reply.Len() @@ -334,8 +334,8 @@ func (r *Request) Scrub(reply *dns.Msg) *dns.Msg { // pretty rare. Normally, the loop will exit when l > ra, meaning that // in the previous iteration either: // rl < size: no need to do anything. - // rl > size: the final size is too large, and if m > 0, the preceeding - // iteration the size was too small. Select that preceeding size. + // rl > size: the final size is too large, and if m > 0, the preceding + // iteration the size was too small. Select that preceding size. if rl > size && m > 0 { reply.Answer = origAnswer[:m-1] // No need to recalc length, as we don't use it. We set truncated anyway. Doing diff --git a/test/compression_scrub_test.go b/test/compression_scrub_test.go index b18f1fe0a..3e6481aef 100644 --- a/test/compression_scrub_test.go +++ b/test/compression_scrub_test.go @@ -42,7 +42,7 @@ func TestCompressScrub(t *testing.T) { } buf = buf[:n] // If there is compression in the returned packet we should look for compression pointers, if found - // the pointers should return to the domain name in the query (the first domain name that's avaiable for + // the pointers should return to the domain name in the query (the first domain name that's available for // compression. This means we're looking for a combo where the pointers is detected and the offset is 12 // the position of the first name after the header. The erratic plugin adds 30 RRs that should all be compressed. found := 0 diff --git a/test/metrics_test.go b/test/metrics_test.go index da7e7b322..d12eac12c 100644 --- a/test/metrics_test.go +++ b/test/metrics_test.go @@ -161,7 +161,7 @@ google.com:0 { } defer i.Stop() - // send an inital query to setup properly the cache size + // send an initial query to setup properly the cache size m := new(dns.Msg) m.SetQuestion("google.com.", dns.TypeA) if _, err = dns.Exchange(m, udp); err != nil {