mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Remove pkg directory
- As recommended by Docker committers. - Will introduce internal directory when go supports it Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
		
							parent
							
								
									8d4460a208
								
							
						
					
					
						commit
						f16db2c3ad
					
				
					 30 changed files with 25 additions and 25 deletions
				
			
		
							
								
								
									
										17
									
								
								libnetwork/resolvconf/dns/resolvconf.go
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								libnetwork/resolvconf/dns/resolvconf.go
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
package dns
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"regexp"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// IPLocalhost is a regex patter for localhost IP address range.
 | 
			
		||||
const IPLocalhost = `((127\.([0-9]{1,3}.){2}[0-9]{1,3})|(::1))`
 | 
			
		||||
 | 
			
		||||
var localhostIPRegexp = regexp.MustCompile(IPLocalhost)
 | 
			
		||||
 | 
			
		||||
// IsLocalhost returns true if ip matches the localhost IP regular expression.
 | 
			
		||||
// Used for determining if nameserver settings are being passed which are
 | 
			
		||||
// localhost addresses
 | 
			
		||||
func IsLocalhost(ip string) bool {
 | 
			
		||||
	return localhostIPRegexp.MatchString(ip)
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue