mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-28 16:54:15 -04:00 
			
		
		
		
	* Update Caddy to 1.0.1, and update import path This fix updates caddy to 1.0.1 and also updates the import path to github.com/caddyserver/caddy This fix fixes 2959 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Also update plugin.cfg Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update and bump zplugin.go Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			448 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			448 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package debug
 | |
| 
 | |
| import (
 | |
| 	"github.com/coredns/coredns/core/dnsserver"
 | |
| 	"github.com/coredns/coredns/plugin"
 | |
| 
 | |
| 	"github.com/caddyserver/caddy"
 | |
| )
 | |
| 
 | |
| func init() {
 | |
| 	caddy.RegisterPlugin("debug", caddy.Plugin{
 | |
| 		ServerType: "dns",
 | |
| 		Action:     setup,
 | |
| 	})
 | |
| }
 | |
| 
 | |
| func setup(c *caddy.Controller) error {
 | |
| 	config := dnsserver.GetConfig(c)
 | |
| 
 | |
| 	for c.Next() {
 | |
| 		if c.NextArg() {
 | |
| 			return plugin.Error("debug", c.ArgErr())
 | |
| 		}
 | |
| 		config.Debug = true
 | |
| 	}
 | |
| 
 | |
| 	return nil
 | |
| }
 |