From e78d9a7893d8f51122f25e396935085bd9afe266 Mon Sep 17 00:00:00 2001 From: Nguyen Phuong An Date: Wed, 20 Feb 2019 19:12:21 +0700 Subject: [PATCH] Remove some duplicate worlds (#2582) Signed-off-by: Nguyen Phuong An --- core/dnsserver/config.go | 2 +- core/dnsserver/server_grpc.go | 2 +- plugin/auto/walk.go | 2 +- plugin/auto/zone.go | 2 +- plugin/file/secondary_test.go | 2 +- plugin/kubernetes/kubernetes_test.go | 2 +- plugin/rewrite/class.go | 2 +- plugin/rewrite/type.go | 2 +- plugin/test/helpers.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/dnsserver/config.go b/core/dnsserver/config.go index a63058d43..811d39426 100644 --- a/core/dnsserver/config.go +++ b/core/dnsserver/config.go @@ -21,7 +21,7 @@ type Config struct { // The port to listen on. Port string - // Root points to a base directory we we find user defined "things". + // Root points to a base directory we find user defined "things". // First consumer is the file plugin to looks for zone files in this place. Root string diff --git a/core/dnsserver/server_grpc.go b/core/dnsserver/server_grpc.go index 5a1dcc709..e26eaebfb 100644 --- a/core/dnsserver/server_grpc.go +++ b/core/dnsserver/server_grpc.go @@ -154,7 +154,7 @@ type gRPCresponse struct { } // Write is the hack that makes this work. It does not actually write the message -// but returns the bytes we need to to write in r. We can then pick this up in Query +// but returns the bytes we need to write in r. We can then pick this up in Query // and write a proper protobuf back to the client. func (r *gRPCresponse) Write(b []byte) (int, error) { r.Msg = new(dns.Msg) diff --git a/plugin/auto/walk.go b/plugin/auto/walk.go index 25b559cb9..d4002a46d 100644 --- a/plugin/auto/walk.go +++ b/plugin/auto/walk.go @@ -87,7 +87,7 @@ func (a Auto) Walk() error { return nil } -// matches matches re to filename, if is is a match, the subexpression will be used to expand +// matches re to filename, if it is a match, the subexpression will be used to expand // template to an origin. When match is true that origin is returned. Origin is fully qualified. func matches(re *regexp.Regexp, filename, template string) (match bool, origin string) { base := filepath.Base(filename) diff --git a/plugin/auto/zone.go b/plugin/auto/zone.go index 9839ad04d..c139e7241 100644 --- a/plugin/auto/zone.go +++ b/plugin/auto/zone.go @@ -56,7 +56,7 @@ func (z *Zones) Add(zo *file.Zone, name string) { z.Unlock() } -// Remove removes the zone named name from z. It also stop the the zone's reload goroutine. +// Remove removes the zone named name from z. It also stop the zone's reload goroutine. func (z *Zones) Remove(name string) { z.Lock() diff --git a/plugin/file/secondary_test.go b/plugin/file/secondary_test.go index b140dfe01..bc65c2d99 100644 --- a/plugin/file/secondary_test.go +++ b/plugin/file/secondary_test.go @@ -146,7 +146,7 @@ func TestIsNotify(t *testing.T) { // need to set opcode state.Req.Opcode = dns.OpcodeNotify - z.TransferFrom = []string{"10.240.0.1:53"} // IP from from testing/responseWriter + z.TransferFrom = []string{"10.240.0.1:53"} // IP from testing/responseWriter if !z.isNotify(state) { t.Fatal("Should have been valid notify") } diff --git a/plugin/kubernetes/kubernetes_test.go b/plugin/kubernetes/kubernetes_test.go index 6b661f7d5..26f3747ee 100644 --- a/plugin/kubernetes/kubernetes_test.go +++ b/plugin/kubernetes/kubernetes_test.go @@ -287,7 +287,7 @@ func TestServices(t *testing.T) { continue } if len(svcs) != 1 { - t.Errorf("Test %d, expected expected 1 answer, got %v", i, len(svcs)) + t.Errorf("Test %d, expected 1 answer, got %v", i, len(svcs)) continue } diff --git a/plugin/rewrite/class.go b/plugin/rewrite/class.go index dceb4429b..6906dcf6c 100644 --- a/plugin/rewrite/class.go +++ b/plugin/rewrite/class.go @@ -29,7 +29,7 @@ func newClassRule(nextAction string, args ...string) (Rule, error) { return &classRule{from, to, nextAction}, nil } -// Rewrite rewrites the the current request. +// Rewrite rewrites the current request. func (rule *classRule) Rewrite(ctx context.Context, state request.Request) Result { if rule.fromClass > 0 && rule.toClass > 0 { if state.Req.Question[0].Qclass == rule.fromClass { diff --git a/plugin/rewrite/type.go b/plugin/rewrite/type.go index eebb1c02e..91fc593a3 100644 --- a/plugin/rewrite/type.go +++ b/plugin/rewrite/type.go @@ -30,7 +30,7 @@ func newTypeRule(nextAction string, args ...string) (Rule, error) { return &typeRule{from, to, nextAction}, nil } -// Rewrite rewrites the the current request. +// Rewrite rewrites the current request. func (rule *typeRule) Rewrite(ctx context.Context, state request.Request) Result { if rule.fromType > 0 && rule.toType > 0 { if state.QType() == rule.fromType { diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go index a74101109..28b48e450 100644 --- a/plugin/test/helpers.go +++ b/plugin/test/helpers.go @@ -130,7 +130,7 @@ func Header(tc Case, resp *dns.Msg) error { return nil } -// Section tests if the the section in tc matches rr. +// Section tests if the section in tc matches rr. func Section(tc Case, sec sect, rr []dns.RR) error { section := []dns.RR{} switch sec {