mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
move dependencies to vendor
This commit is contained in:
17
vendor/github.com/docker/libnetwork/resolvconf/dns/resolvconf.go
generated
vendored
Normal file
17
vendor/github.com/docker/libnetwork/resolvconf/dns/resolvconf.go
generated
vendored
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)
|
||||
}
|
Reference in New Issue
Block a user