mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-27 08:14:18 -04:00 
			
		
		
		
	Remove some duplicate worlds (#2582)
Signed-off-by: Nguyen Phuong An <AnNP@vn.fujitsu.com>
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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() | ||||
|  | ||||
|   | ||||
| @@ -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") | ||||
| 	} | ||||
|   | ||||
| @@ -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 | ||||
| 		} | ||||
|  | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user