mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-27 16:24:19 -04:00 
			
		
		
		
	server: remove if registry != nil code (#2735)
I can't find what's this code should be doing and it looks like it's not doing anything. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
		| @@ -66,22 +66,8 @@ func NewServer(addr string, group []*Config) (*Server, error) { | ||||
| 		} | ||||
| 		// set the config per zone | ||||
| 		s.zones[site.Zone] = site | ||||
|  | ||||
| 		// compile custom plugin for everything | ||||
| 		if site.registry != nil { | ||||
| 			// this config is already computed with the chain of plugin | ||||
| 			// set classChaos in accordance with previously registered plugins | ||||
| 			for name := range EnableChaos { | ||||
| 				if _, ok := site.registry[name]; ok { | ||||
| 					s.classChaos = true | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			// set trace handler in accordance with previously registered "trace" plugin | ||||
| 			if handler, ok := site.registry["trace"]; ok { | ||||
| 				s.trace = handler.(trace.Trace) | ||||
| 			} | ||||
| 			continue | ||||
| 		} | ||||
| 		var stack plugin.Handler | ||||
| 		for i := len(site.Plugin) - 1; i >= 0; i-- { | ||||
| 			stack = site.Plugin[i](stack) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user