mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			270 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			270 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package setup
 | 
						|
 | 
						|
import "github.com/miekg/coredns/middleware"
 | 
						|
 | 
						|
// BindHost sets the host to bind the listener to.
 | 
						|
func BindHost(c *Controller) (middleware.Middleware, error) {
 | 
						|
	for c.Next() {
 | 
						|
		if !c.Args(&c.BindHost) {
 | 
						|
			return nil, c.ArgErr()
 | 
						|
		}
 | 
						|
	}
 | 
						|
	return nil, nil
 | 
						|
}
 |